Skip to content

Instantly share code, notes, and snippets.

@mrister
Last active May 24, 2017 20:39
Show Gist options
  • Save mrister/7f8912e1c13d9d6b0b461176791517ca to your computer and use it in GitHub Desktop.
Save mrister/7f8912e1c13d9d6b0b461176791517ca to your computer and use it in GitHub Desktop.
Create Loggly stream with Bunyan
const bunyan = require('bunyan');
const Bunyan2Loggly = require('bunyan-loggly');
const log = bunyan.createLogger({
name: 'logglylog',
streams: [
{
type: 'raw',
stream: new Bunyan2Loggly({
token: 'YOUR_TOKEN',
subdomain: 'YOUR_SUBDOMAIN',
json: true
})
}
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment