Skip to content

Instantly share code, notes, and snippets.

@AdamMagaluk
Created February 3, 2015 15:40
Show Gist options
  • Save AdamMagaluk/ba506495f16a5fdc02bb to your computer and use it in GitHub Desktop.
Save AdamMagaluk/ba506495f16a5fdc02bb to your computer and use it in GitHub Desktop.
Papertrail with Zetta
var zetta = require('zetta');
var winston = require('winston');
var Papertrail = require('winston-papertrail').Papertrail;
winston.add(Papertrail, { hostname: 'hub-hostname',
host: process.env.PAPERTRAIL_HOST,
port: process.env.PAPERTRAIL_PORT });
zetta()
.logger(function(log) {
log.on('message', function(level, event, msg, data) {
winston.log(level, msg);
});
})
.listen(process.env.PORT || 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment