made calling logger.log safe if level is not provided as first argument (github issue #279)
This commit is contained in:
@@ -51,7 +51,7 @@ Logger.prototype.removeLevel = function() {
|
||||
|
||||
Logger.prototype.log = function() {
|
||||
var args = Array.prototype.slice.call(arguments)
|
||||
, logLevel = levels.toLevel(args.shift())
|
||||
, logLevel = levels.toLevel(args.shift(), levels.INFO)
|
||||
, loggingEvent;
|
||||
if (this.isLevelEnabled(logLevel)) {
|
||||
loggingEvent = new LoggingEvent(this.category, logLevel, args, this);
|
||||
|
||||
Reference in New Issue
Block a user