0.0.0 • Published 9 years ago
winston-sumologic v0.0.0
Winston SumoLogic Transport
Transport for Winston to a "preferred" SumoLogic log format. See here for details.
Most of the code was pulled from the default File.js code, just changed the way it's formatted.
Options
- silent: Boolean flag indicating whether to suppress output.
- filename: The filename of the logfile to write output to.
- maxsize: Max size in bytes of the logfile, if the size is exceeded then a new file is created.
- maxFiles: Limit the number of files created when the size of the logfile is exceeded.
- stream: The WriteableStream to write output to.
var WinstonSumoLogic = require('winston-sumologic');
new WinstonSumoLogic({
filename: 'error.log'
});
Log output format
2014-11-18T21:55:11.241Z ERROR [project-name] {"some":"data","is":false}
2014-11-18T21:55:11.241Z INFO [project-name-metric] {"some":"data","is":true}
0.0.0
9 years ago