### Include Vibrant-Logger.js via CDN Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Vibrant-Logger.md This snippet shows how to include the Vibrant-Logger.js library in your HTML project using a Content Delivery Network (CDN). This is the recommended installation method for quick setup. ```html ``` -------------------------------- ### Configure and Instantiate Vibrant Logger Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/tests/test.html This snippet shows how to define a configuration object for the logger, including properties like 'name', 'theme', and 'style'. It then demonstrates how to instantiate the Logger class using this configuration. Commented-out code provides an example of custom color settings. ```JavaScript // const customColors = { // INFO: "#FF00FF", // WARN: "#FFFF00", // ERRR: "#FF0000", // SUCCESS: "#00FF00", // DEBUG: "#0000FF", // UNKNOWN: "#808080", // background: "#FFFFFF" // }; const config = { name: "lol", theme: "dark", style: "auto", // customColors: customColors, } // const logger = new Logger("time"); const logger = new Logger(config); ``` -------------------------------- ### Initialize Vibrant-Logger.js Instance Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Vibrant-Logger.md This JavaScript snippet shows how to create a new instance of the `Logger` class. This is the fundamental step required before you can start logging messages with Vibrant-Logger.js. ```js const logger = new Logger(); ``` -------------------------------- ### Initialize and Use Vibrant Logger.js Methods Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/tests/cdn-test.html This snippet initializes a new Logger instance with a specified name and theme. It then demonstrates the usage of various logging methods such as log, info, warn, error, success, debug, and unknown to output different types of messages to the console, illustrating the logger's diverse capabilities. ```JavaScript const logger = new Logger({ name: "Test", theme: "light" }); logger.log("This is a log message"); logger.info("This is an info message"); logger.warn("This is a warning message"); logger.error("This is an error message"); logger.success("This is a success message"); logger.debug("This is a debug messageThis is a debug messageThis is a debug messageThis is a debug messageThis is a debug messageThis is a debug messageThis is a debug message"); logger.unknown("This is an unknown message"); ``` -------------------------------- ### Install Tiny-Logger.js Function Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Tiny-Logger.md This snippet provides the core 'log' function for Tiny-Logger.js, designed to be directly pasted into a JavaScript file or embedded within an HTML ``` -------------------------------- ### Include Vibrant-Logger.js from Local File Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Vibrant-Logger.md This snippet demonstrates how to include the Vibrant-Logger.js library in your HTML project by downloading the file and referencing it locally. Ensure 'VibrantLogger.min.js' is in the specified path relative to your HTML file. ```html ``` -------------------------------- ### Initialize and Log Messages with VibrantLogger.js Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/tests/thumbnail.html This snippet demonstrates how to initialize VibrantLogger.js with a custom name and theme, and then use its various logging methods (success, debug, info, warn, error) to output messages to the console, showcasing different log levels and their visual styles. ```JavaScript const logger = new Logger({ name: "VibrantLogger.js", theme: "light", }); logger.success("VibrantLogger.js is a simple but visually pleasing console logger for JavaScript"); logger.debug("It is easy to use and has a lot of features"); logger.info("Visit the GitHub repository for more information"); logger.warn("It is still in development, so expect bugs"); logger.error("If you find any bugs, please report them on the GitHub repository"); ``` -------------------------------- ### Customize Vibrant-Logger.js Instance with Options Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Vibrant-Logger.md This JavaScript snippet shows how to customize the `Logger` instance during initialization by providing an options object. You can configure the logger's display name, theme (auto, light, dark), and style (auto, maxi) to match your application's needs. ```js const logger = new Logger({ name: "My App", // The name of your app theme: "light", // The theme of the logger (auto, light, dark) style: "maxi" // The style of the logger (auto, maxi) }); ``` -------------------------------- ### Log Messages with Vibrant Logger Methods Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/tests/test.html This snippet illustrates the use of various logging methods provided by the Logger instance. It demonstrates how to output different types of messages, such as general logs, info, warnings, errors, success, debug, and unknown messages, to the console. ```JavaScript logger.log("This is a log message"); logger.info("This is an info message"); logger.warn("This is a warning message"); logger.error("This is an error message"); logger.success("This is a success message"); logger.debug("This is a debug messageThis is a debug messageThis is a debug messageThis is a debug messageThis is a debug messageThis is a debug messageThis is a debug message"); logger.unknown("This is an unknown message"); ``` -------------------------------- ### Log Messages with Standard Levels in Vibrant-Logger.js Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Vibrant-Logger.md This JavaScript snippet demonstrates how to use the predefined log levels (INFO, WARN, ERROR, SUCCESS, DEBUG) with the `logger` instance. Each function call outputs a message to the console with its corresponding visual style. ```js logger.info("This is INFO"); logger.warn("This is WARN"); logger.error("This is ERROR"); logger.success("This is SUCCESS"); logger.debug("This is DEBUG"); ``` -------------------------------- ### Use Tiny-Logger.js with Different Log Levels Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Tiny-Logger.md This snippet demonstrates how to use the 'log' function with its various predefined log levels: INFO, WARN, ERROR, SUCCESS, DEBUG, and UNKNOWN. Each call logs a message to the console, formatted according to the specified level's color scheme. ```js log("INFO", "This is INFO"); log("WARN", "This is WARN"); log("ERROR", "This is ERROR"); log("SUCCESS", "This is SUCCESS"); log("DEBUG", "This is DEBUG"); log("UNKNOWN", "This is UNKNOWN"); ``` -------------------------------- ### Define Custom Log Colors in Vibrant-Logger.js Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Vibrant-Logger.md This JavaScript snippet demonstrates how to define custom colors for different log levels and the background by providing a `customColors` object during logger initialization. This allows for highly personalized console output beyond the default themes. ```js const logger = new Logger({ name: "My App", // The name of your app customColors: { INFO: "#82AAFF", WARN: "#FFCB6B", EXAMPLE1: "#1FCA3A", EXAMPLE2: "#FF5370", EXAMPLE3: "#C3E88D", background: "#434C5E" } }); ``` -------------------------------- ### Log Messages with Generic `log` Function in Vibrant-Logger.js Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Vibrant-Logger.md This JavaScript snippet illustrates how to use the generic `log` function, allowing you to specify the log level as the first argument. This method provides flexibility and is essential for using custom log levels. ```js logger.log("INFO", "This is INFO"); ``` -------------------------------- ### Log Messages with Custom Types in Vibrant-Logger.js Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Vibrant-Logger.md This JavaScript snippet shows how to use the `log` function with custom log types (e.g., EXAMPLE1, EXAMPLE2, EXAMPLE3) that were previously defined in the `customColors` configuration. This enables flexible and extended logging categories tailored to your application's specific needs. ```js logger.log("EXAMPLE1", "This is EXAMPLE1"); logger.log("EXAMPLE2", "This is EXAMPLE2"); logger.log("EXAMPLE3", "This is EXAMPLE3"); ``` -------------------------------- ### Customize Tiny-Logger.js Colors Source: https://github.com/jmcrafter26/vibrant-logger.js/blob/main/Tiny-Logger.md This snippet shows the 'colors' object used internally by Tiny-Logger.js, which can be modified to customize the console output colors for each log level (INFO, WARN, ERROR, SUCCESS, DEBUG, UNKNOWN) and the background. Users can change these hexadecimal color values to match their application's theme. ```js const colors = { INFO: "#82AAFF", WARN: "#FFCB6B", ERROR: "#FF5370", SUCCESS: "#C3E88D", DEBUG: "#d382ff", UNKNOWN: "#abb2bf", background: "#434C5E" }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.