Skip to content

Instantly share code, notes, and snippets.

@mullr
Created May 31, 2012 08:13
Show Gist options
  • Save mullr/2841816 to your computer and use it in GitHub Desktop.
Save mullr/2841816 to your computer and use it in GitHub Desktop.
A sane winston logging setup
winston = require 'winston'
level = 'info'
level = 'debug' if process.env.NODE_ENV is 'development'
levels =
debug: 0
info: 1
warn: 2
error: 3
logger = new winston.Logger
levels: levels
transports: [new winston.transports.Console(level: level)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment