HBOCodeLabs/winston — pull request #2 by jstamerj (2013-05-17 21:54:24+00:00)
Title: Fix logging when level is set on the logger, but no level is set on transports

Example code:
var winston = require('winston');
var logger = new winston.Logger({
level: 'warn',
transports: [new winston.transports.Console()]
});
logger.info('should not see this');
logger.warn('should see this');

Expected output:
should see this

Actual output:
should not see this
should see this

Reason: transport.js sets a default level of 'Info' when no level option is set on a transport. logger.js always uses the transport level (when set) instead of using the level set on the logger. Since a level is always set on every transport, the logger's level is never used.

I changed transport.js so that it does not set a default value for this.level. This fixes the issue.