You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
583 B
17 lines
583 B
var winston = require('../lib/winston'); |
|
|
|
// |
|
// Create a new winston logger instance with two tranports: Console, and Webhook |
|
// |
|
// |
|
// The Console transport will simply output to the console screen |
|
// The Webhook tranports will perform an HTTP POST request to an abritrary end-point ( for post/recieve webhooks ) |
|
// |
|
var logger = new (winston.Logger)({ |
|
transports: [ |
|
new (winston.transports.Console)(), |
|
new (winston.transports.Webhook)({ 'host': 'localhost', 'port': 8080, 'path': '/collectdata' }) |
|
] |
|
}); |
|
|
|
logger.log('info', 'Hello webhook log files!', { 'foo': 'bar' });
|
|
|