Skip to content

Instantly share code, notes, and snippets.

@sowamazing
Created November 5, 2015 18:54
var winston = require('winston');
winston.add(
winston.transports.File, {
filename: 'node-log-file.json.log',
level: 'info',
json: true,
eol: '\n', // for Windows, or `eol: '\n',` for *NIX OSs
timestamp: true
}
);
winston.log('info', 'Hello log files!');
winston.info('Hello again log files!');
winston.debug('Could not connect to database.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment