1.0.0 • Published 2 years ago

better-loggger-test v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Better Logger

A SIMPLE LOGGING SOLUTION

Installation

npm install --save better-logger

Usage

const Logger = require('better-logger');
const log = new Logger('ServiceName');

// Log an INFO message
log.info('This is an info message');

// Log an ERROR message
log.error('This is an error message');

// Log an WARN message
log.warn('This is an warn message');

Current Message Format

typeservicename

INFOSERVICENAME This is an info message.

Options

The logger receives an optional options object as the 2nd parameter.

@param@typeDefaultNote
logfilebooleanFALSEenable file logging
logPathstringNULLrequired with logFile, absolute path to store log files
logUTCbooleanTRUEenable log time in UTC
logColorsobjectnulldefine the log colors props

info: \<string> default - yellow error: \<string> default - red warn: \<string> default - white date: \<string> default - magenta

Available Colors

bright | red | green | yellow | blue | magenta | cyan | white

Issues

Please use the issue tracker to report issues with the project. My sincerest thanks to all you beta testers. 🥂

1.0.0

2 years ago