1
0
Fork 0
mirror of https://github.com/seejohnrun/haste-server.git synced 2024-11-01 11:31:22 +00:00
haste-server/node_modules/winston/examples/webhook-post.js
2012-02-06 14:09:01 -05:00

17 lines
583 B
JavaScript

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' });