{"library":"logdown","title":"logdown: Markdown Debug Utility","description":"logdown is a versatile JavaScript debug utility designed for both browser and Node.js environments, providing a consistent logging interface with built-in Markdown formatting support. Currently stable at version 3.3.1, the library maintains a fairly active release cadence within its major version 3, introducing enhancements such as custom transports, optimized bundle sizes through Webpack, improved cross-environment compatibility, and modular internal architecture. Its key differentiators include automatic Markdown parsing for log messages, seamless delegation to native console methods, and compatibility with standard debugging mechanisms like Node.js's `NODE_DEBUG` environment variable and browser `localStorage.debug`. The library is lightweight, with the browser version having no external dependencies and a minimal gzipped footprint, making it suitable for performance-sensitive applications.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install logdown"],"cli":null},"imports":["import logdown from 'logdown';","const logdown = require('logdown');","const logger = logdown('my-prefix');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import logdown from 'logdown';\n\n// Initialize a logger with a unique prefix (e.g., your module name)\nconst myLogger = logdown('my-app:feature');\n\n// By default, logs are disabled unless activated via environment variables or explicitly\n// For demonstration, we'll enable it directly.\nmyLogger.state.isEnabled = true;\n\n// Log messages with Markdown formatting\nmyLogger.log('Hello, *world*! This is a simple log message.');\nmyLogger.info('This is _information_ about something important.');\nmyLogger.warn('A `warning` occurred, perhaps an API call failed gracefully.');\nmyLogger.error('An **error** was encountered: `process.exit(1)`');\n\n// Multiple arguments are supported, similar to console.log\nmyLogger.log('User:', { id: 123, name: 'John Doe' }, 'action:', 'logged in');\n\n// You can also disable markdown per-logger instance\nconst rawLogger = logdown({ prefix: 'raw-output', markdown: false });\nrawLogger.log('This *will not* be parsed as markdown.');\nrawLogger.state.isEnabled = true;\n","lang":"javascript","description":"Initializes a logdown logger with a prefix, demonstrates enabling logs programmatically, and showcases various logging methods with Markdown formatting, including multi-argument logging and disabling Markdown.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}