Skip to content

Instantly share code, notes, and snippets.

@soar
Created April 7, 2017 11:36
Show Gist options
  • Save soar/8028418d8c6e75e51d673e593ee78a17 to your computer and use it in GitHub Desktop.
Save soar/8028418d8c6e75e51d673e593ee78a17 to your computer and use it in GitHub Desktop.
var winston_graylog2_settings = {
name: 'graylog2',
level: 'debug',
handleExceptions: true,
graylog: {
servers: [{host: "logstash", port: 12201}]
}
};
var winston = require("winston");
winston.level = 'debug';
winston.add(require("winston-graylog2"), winston_graylog2_settings);
winston.info('info test message');
winston.debug('debug test message');
winston.warn('warn test message');
winston.info('this is \n multiline \n comment');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment