0.0.4 • Published 7 years ago

easy-node-logger v0.0.4

Weekly downloads
15
License
-
Repository
github
Last release
7 years ago

node-logger

Logger for Node JS

##Installation npm install easy-node-logger

##How to Use

  • Include the package
var logger = require('easy-node-logger');
  • Initialize the logger with your logs directory
logger.init({path: './logs'}); //Please make sure this directory exists
  • Start Logging
//Info Log
logger.log('This is an Info log');

//or
logger.info('This is an Info log');
 
//Error Log
logger.error('This is an Error log');

##More Configs You can mention these configs while initalizing the logger to override

logger.init({
    path: './logs', 
    appendDateTime: true, 
    format: 'json'
});

path: (String) Path of the directory where you want to store your logs

appendDateTime: (Boolean) If set true, appends timestamp to each log record

format: (String) Supported formats include 'json' and 'text'

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago