diff --git a/lib/myLogger.js b/lib/myLogger.js index e145032..b44d9a2 100644 --- a/lib/myLogger.js +++ b/lib/myLogger.js @@ -46,14 +46,13 @@ function myLogger(debugLevel,logger,creationLogPath) { this.creationPassed = false; fs.writeFileSync(this.creationLogPath+startLog, '['+(new Date().toISOString())+"] ---Début du log de création---\n"); this.log = function(level, msg) { - level=level.toLowerCase(); msg = util.format.apply(util, Array.prototype.slice.call(arguments, 1)); if(msg) { - if(this.allowedLevel.indexOf(level) !== -1) { + if(this.allowedLevel.indexOf(level.toLowerCase()) !== -1) { msg="["+level.toUpperCase()+"] "+msg; } else { - msg=level+' '+msg; + msg=level.toLowerCase()+' '+msg; } } else { msg=level;