Created
February 3, 2015 15:40
-
-
Save AdamMagaluk/ba506495f16a5fdc02bb to your computer and use it in GitHub Desktop.
Papertrail with Zetta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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