Created
May 16, 2011 03:51
-
-
Save indexzero/973904 to your computer and use it in GitHub Desktop.
Using node-loggly and winston together
This file contains hidden or 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 winston = require('winston'), | |
loggly = require('loggly'); | |
var client = loggly.createClient({ | |
subdomain: "your-subdomain", | |
auth: { | |
username: "your-username", | |
password: "your-password" | |
} | |
}); | |
client.getInputs(function (err, inputs) { | |
if (err) throw err; | |
var input = inputs.filter(function (i) { return i.name === 'your-input-name' })[0]; | |
winston.add(winston.transports.Loggly, { | |
subdomain: 'your-subdomain', | |
inputToken: input.input_token | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment