From 7066a6dcb95973aea9fb5b3948cb3125a11f8e85 Mon Sep 17 00:00:00 2001 From: Nebz <28622481+NebzHB@users.noreply.github.com> Date: Sat, 25 May 2024 09:18:29 +0200 Subject: [PATCH] Update myLogger.js --- lib/myLogger.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/myLogger.js b/lib/myLogger.js index 4df98f6..af85d27 100644 --- a/lib/myLogger.js +++ b/lib/myLogger.js @@ -28,7 +28,7 @@ module.exports = { var debug = {}; debug.DEBUG = 100; debug.INFO = 200; -debug.WARN = 300; +debug.WARNING = 300; debug.ERROR = 400; debug.NO = 1000; @@ -41,7 +41,7 @@ var loggerCache = {}; function myLogger(debugLevel,logger,creationLogPath) { this.logger = logger; this.debugLevel= debugLevel; - this.allowedLevel = ['debug','info','warn','error','conf']; + this.allowedLevel = ['debug','info','warning','error','conf']; this.creationLogPath = creationLogPath; this.creationPassed = false; fs.writeFileSync(this.creationLogPath+startLog, '['+(new Date().toISOString())+"] ---Début du log de création---\n"); @@ -69,7 +69,7 @@ function myLogger(debugLevel,logger,creationLogPath) { if(this.debugLevel == debug.NO) {msg=null;return;} if(this.debugLevel > debug.DEBUG && level == "debug") {msg=null;return;} if(this.debugLevel > debug.INFO && level == "info") {msg=null;return;} - if(this.debugLevel > debug.WARN && level == "warn") {msg=null;return;} + if(this.debugLevel > debug.WARNING && level == "warning") {msg=null;return;} if(this.debugLevel > debug.ERROR && level == "error") {msg=null;return;} this.logger(msg);