Skip to content

Custom logger for node.js which logs the messages to console and saves to log files.

Notifications You must be signed in to change notification settings

karthikash/node.js-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winston - logger - node.js

using this winston we can log

`${info.timestamp} [${info.label}] ${info.level}: ${info.message}`
// e.g. 2019-05-01T05:39:14.292Z [My Logger] silly: This one is a Silly log!

Installation & Quick Start

winston requires Node.js to run.
Install the dependencies.
$ cd node.js-logger
$ npm install

Create an .env file in order to switch the environments

For development environments..
$ ENV = dev
$ npm start

The logger will log all the logs into the console if the environment is set to dev

For production environments..
$ ENV = prod
$ npm start

The logger will log all the logs into comined.log if the environment is set to prod

About

Custom logger for node.js which logs the messages to console and saves to log files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published