Created
May 31, 2012 08:13
-
-
Save mullr/2841816 to your computer and use it in GitHub Desktop.
A sane winston logging setup
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
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