bunyan-hipchat
v1.0.2
Published
Bunyan plugin for HipChat
Downloads
7
Readme
bunyan-hipchat
Illustration by Brendan Corris
Stream to write bunyan logs to HipChat.
Usage
var bunyan = require('bunyan');
var BunyanHipchat = require('bunyan-hipchat');
var token = '1234512345123451234512345123451234512345'
var roomID = '12345';
// Add HipChat plugin/stream to Bunyan
var logger = bunyan.createLogger({
name: 'API',
streams: [
{
level: 'trace',
stream: process.stdout
}, {
level: 'trace',
stream: new BunyanHipchat({
token: token,
roomId: roomId
}),
type: 'raw'
}
]
});
// Log different levels
logger.trace('trace');
logger.debug('debug');
logger.info('info');
logger.warn('warn');
logger.error('error');
logger.fatal('fatal');
Example
Note: Don't forget to fill with a valid token and roomId
TOKEN="" ROOMID="" npm run example
Contributors
This project was created by Thales Pinheiro (@thalesfsp)
Roadmap
- Next version: 2.0
- Features:
- Add tests
- Move to ES6
- Allow selection between api V1/V2