Skip to content

Instantly share code, notes, and snippets.

View FelipeJz's full-sized avatar

Felipe Jimenez FelipeJz

View GitHub Profile
@FelipeJz
FelipeJz / Logger.js
Last active August 5, 2016 17:06 — forked from santhoshtr/Logger.js
Winston based configurable node logger
var winston = require( 'winston' ),
fs = require( 'fs' ),
logDir = 'log', // Or read from a configuration
env = process.env.NODE_ENV || 'development',
logger;
winston.setLevels( winston.config.npm.levels );
winston.addColors( winston.config.npm.colors );
if ( !fs.existsSync( logDir ) ) {