1
0
Fork 0
forked from svrjs/svrjs

Fix the "SERVER MESSAGE" in SVR.JS log viewer and log highlighter

This commit is contained in:
Dorian Niemiec 2024-03-17 21:39:21 +01:00
parent 096121695c
commit 30367a1338
2 changed files with 2 additions and 2 deletions

View file

@ -45,7 +45,7 @@ function viewLog(log) {
} else if(log[i].indexOf("SERVER WARNING MESSAGE") != -1) {
log[i] = log[i].replace("SERVER WARNING MESSAGE","\x1b[43m\x1b[1mSERVER WARNING MESSAGE\x1b[22m") + "\x1b[40m\x1b[0m";
} else if(log[i].indexOf("SERVER MESSAGE") != -1) {
log[i] = log[i].replace("SERVER MESSAGE","\x1b[43m\x1b[1mSERVER WARNING MESSAGE\x1b[22m");
log[i] = log[i].replace("SERVER MESSAGE","\x1b[1mSERVER MESSAGE\x1b[22m");
}
console.log(log[i]);
}

View file

@ -76,7 +76,7 @@ function viewLog(log) {
} else if(log[i].indexOf("SERVER WARNING MESSAGE") != -1) {
log[i] = log[i].replace("SERVER WARNING MESSAGE","\x1b[43m\x1b[1mSERVER WARNING MESSAGE\x1b[22m") + "\x1b[40m\x1b[0m";
} else if(log[i].indexOf("SERVER MESSAGE") != -1) {
log[i] = log[i].replace("SERVER MESSAGE","\x1b[43m\x1b[1mSERVER WARNING MESSAGE\x1b[22m");
log[i] = log[i].replace("SERVER MESSAGE","\x1b[1mSERVER MESSAGE\x1b[22m");
}
console.log(log[i]);
}