winston-sumologic

0.0.0 • Public • Published

Winston SumoLogic Transport

Build Status

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}

Package Sidebar

Install

npm i winston-sumologic

Weekly Downloads

1

Version

0.0.0

License

MIT

Last publish

Collaborators

  • gwing33