An elegant console logger for Node.js and browser environments with pluggable reporters and interactive prompts.
Consola is an elegant console logger for Node.js and browser environments that wraps standard console methods with enhanced features like structured logging, pluggable reporters, and interactive prompts. It solves the problem of inconsistent and limited logging capabilities across different JavaScript runtimes by providing a unified, feature-rich interface.
JavaScript and TypeScript developers working on Node.js applications, CLI tools, or browser-based projects who need advanced logging, testing utilities, or interactive console features.
Developers choose Consola for its elegant output, extensibility through custom reporters, seamless cross-environment support, and built-in features like log throttling and mocking that simplify development and testing workflows.
🐨 Elegant Console Logger for Node.js and Browser
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides beautifully formatted terminal logs with automatic fallback for minimal environments, enhancing readability during development as shown in the screenshot example.
Supports pluggable custom reporters, allowing outputs like JSON or integration with testing frameworks, demonstrated by the simple JSON reporter example in the README.
Works consistently in Node.js and browser environments with features like console redirection and browser-specific builds, ensuring unified logging behavior.
Includes log throttling to prevent spam, pause/resume functionality for queuing messages, and easy mocking for Jest or Vitest, streamlining testing workflows.
The default fancy reporter increases bundle size; reducing it requires explicitly importing basic builds, which adds complexity and may not be intuitive for all users.
Mocking log types involves careful callback configuration and handling of inherited instances, as noted in the README, which can be error-prone and verbose for testing.
While extensible, Consola lacks built-in reporters for common log aggregation services, forcing developers to create custom solutions for production monitoring.