Created
November 5, 2015 18:54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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