Skip to content

Instantly share code, notes, and snippets.

@kenperkins
Created May 6, 2013 22:21
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 kenperkins/5528711 to your computer and use it in GitHub Desktop.
Save kenperkins/5528711 to your computer and use it in GitHub Desktop.
Winston Regression between 0.6.2 and 0.7.1
var winston = require("winston");
var logger = new winston.Logger({
levels: {
debug: 0,
info: 1,
warn: 2,
error: 3
},
transports: [
new winston.transports.Console({
level: 'debug',
colorize: true
})
]
});
console.log('Winston Version: ' + winston.version);
console.log('\nProxy Methods\n');
logger.info("Hello world");
logger.warn("Hello world", { winston: {
version: winston.version
}});
console.log('\nDirect Access Methods\n')
logger.log('info', "Hello world");
logger.log('warn', "Hello world", { version: winston.version });
Winston Version: 0.6.2
Proxy Methods
info: Hello world
warn: Hello world version=0.6.2
Direct Access Methods
info: Hello world
warn: Hello world version=0.6.2
Winston Version: 0.7.1
Proxy Methods
info: Hello world
warn: Hello world
Direct Access Methods
info: Hello world
warn: Hello world version=0.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment