Skip to content

weekendesk/wed-nodejs-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger configured for Node.js • Actions Status

Simple package exposing and configuring a logger for nodejs services, based on log4js.

The logger can be configured via the LOG_LEVEL environment variable.

Usage

Logger initialization

On the bootstrap of your application, just call the init() function:

const { init } = require('wed-nodejs-logger');

init();

Log data

To log a data, you have to create the logger with a context and call the right function:

const { getLogger } = require('wed-nodejs-logger');

const logger = getLogger('File context');

logger.info('This is an informative message.');
logger.warn('Something is not really good.');
logger.error('Something\'s wrong!');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published