Created
April 7, 2017 11:36
-
-
Save soar/8028418d8c6e75e51d673e593ee78a17 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_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