Skip to content

Instantly share code, notes, and snippets.

@alappe
Created April 7, 2014 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alappe/10018463 to your computer and use it in GitHub Desktop.
Save alappe/10018463 to your computer and use it in GitHub Desktop.
bunyan = require 'bunyan'
logger = bunyan.createLogger
name: 'try file'
streams: [
type: 'stream'
stream: process.stdout
level: 'debug'
,
type: 'stream'
stream: process.stdout
level: 'info'
,
type: 'stream'
stream: process.stderr
level: 'error'
]
serializers:
req: bunyan.stdSerializers.req
res: bunyan.stdSerializers.res
logger.info 'hello info'
logger.debug 'hello debug'
logger.error 'hello error'
@alappe
Copy link
Author

alappe commented Apr 7, 2014

{"name":"try file","hostname":"style.local","pid":4901,"level":30,"msg":"hello info","time":"2014-04-07T11:16:20.869Z","v":0}
{"name":"try file","hostname":"style.local","pid":4901,"level":30,"msg":"hello info","time":"2014-04-07T11:16:20.869Z","v":0}
{"name":"try file","hostname":"style.local","pid":4901,"level":20,"msg":"hello debug","time":"2014-04-07T11:16:20.870Z","v":0}
{"name":"try file","hostname":"style.local","pid":4901,"level":50,"msg":"hello error","time":"2014-04-07T11:16:20.870Z","v":0}
{"name":"try file","hostname":"style.local","pid":4901,"level":50,"msg":"hello error","time":"2014-04-07T11:16:20.870Z","v":0}
{"name":"try file","hostname":"style.local","pid":4901,"level":50,"msg":"hello error","time":"2014-04-07T11:16:20.870Z","v":0}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment