1.0.1 • Published 12 months ago

simple-loger v1.0.1

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

Simple-Loger

Simple-Loger is a feature-packed, yet straightforward logging utility built for Node.js applications. It enhances the debugging and monitoring process by effectively using the console API, while maintaining an uncomplicated interface that makes its integration into any project seamless.

Main Features:

  • Versatile Logging Methods: Simple-Loger comes equipped with various logging methods: log, info, verbose, and error. These can be used to categorize log entries according to their severity or importance, assisting in distinguishing routine logs, detailed debugging data, and crucial error messages.

  • Context-Based Logging: A unique name can be given while creating a Logger instance, which will then appear in all the corresponding log entries. This aids in providing clear context to your logs and helps in pinpointing the source of the log.

  • Easy Integration: The API of Simple-Loger is designed to be intuitive and uncomplicated, allowing for smooth integration into your Node.js project.

Usage:

First, install Simple-Loger using npm:

npm install simple-loger

Then, in your JavaScript file, import the Logger class from Simple-Loger:

const Logger = require('simple-loger');

Next, create a new Logger instance:

const myLogger = new Logger('AppLogger');

You can now destructure the logging methods from your logger instance:

const { log, info, verbose, error } = myLogger;

Now, you can emit log entries with your logger:

log('Standard log message');
info('Informative log message');
verbose('Verbose log message for detailed debugging');
error('Error log message for tracking critical issues');

Each log message will include the unique Logger name ('AppLogger' in this case) to ease tracking.

1.0.1

12 months ago

1.0.0

12 months ago