Skip to content

Commit

Permalink
Update myLogger.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NebzHB authored Jan 29, 2024
1 parent 2c9b66a commit 5fa74fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/myLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5fa74fe

Please sign in to comment.