-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
'use strict';
const winston = require('winston');
const Graylog = require('winston-graylog2');
const logger = new winston.Logger({
level: 'debug',
transports: [
new Graylog({
level: 'debug',
handleExceptions: true,
graylog: {
servers: [{ host: '10.42.221.139', port: 12201 }],
facility: 'debug-test'
}
})
]
});
logger.info('Text Test');
logger.debug({foo: 'bar'});
logger.error(new Error());
logger.error(new Error('Test Error'));
setTimeout(() => {process.exit(0)}, 1000);When running the following script, the first test is the only one inserted in Graylog.
marjan2k
Metadata
Metadata
Assignees
Labels
No labels
