1.2.0 • Published 12 months ago

logger-easy v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

logger-easy

logger-easy is a powerful and flexible logging tool for Node.js that enhances your development experience with colorized output and customizable log formatting.

šŸš€ Features

  • Colorized Output: Enjoy vibrant and easy-to-read logs with color-coded levels.
  • Customizable Logging: Toggle timestamps and log levels to fit your needs.
  • Multiple Log Levels: Log messages with error, warn, info, debug, and success levels.

šŸ“¦ Installation

Easily install the package via npm:

npm i logger-easy

šŸ“œ Usage
Integrate the logger into your project with minimal setup:


import createLogger from "logger-easy";

//Default logger with no timestamps or log levels
const logger = createLogger('debug');

// Log messages
logger.info('This is an info message');
logger.debug('This is a debug message');
logger.warn('This is a warning message');
logger.error('This is an error message');
logger.success('This is a success message');

// Logger with timestamps and log levels
const loggerWithDetails = createLogger('debug', { includeTimestamp: true, includeLevel: true });
loggerWithDetails.info('This message includes timestamp and log level');

āš™ļø Configuration
Customize your logging experience:

includeTimestamp: Add timestamps to log messages (default: false).
includeLevel: Include log levels in messages (default: false).

const logger = createLogger('info', { includeTimestamp: true, includeLevel: true });

šŸš€ Get Started
Whether you're debugging complex applications or simply want a clear and colorful log output, My Logger Package provides the flexibility and ease-of-use to streamline your development workflow.

šŸ“„ License
MIT License. See the LICENSE file for details.

šŸ¤ Contributing
We welcome contributions!

šŸ§‘ā€šŸ’» Author
Abreham Tilahun
1.2.0

12 months ago

1.1.0

12 months ago

1.0.0

12 months ago