mirror of
https://git.stamm.me/OpenServer/NodeLogging.git
synced 2024-12-23 04:59:23 +00:00
Fixing not complete color code removal
This commit is contained in:
parent
e4ea3f660c
commit
df39c423fe
@ -102,7 +102,7 @@ class Logging {
|
||||
console.log(consoleLogFormat + m + Reset);
|
||||
let index = m.indexOf("\x1b");
|
||||
while (index >= 0) {
|
||||
m = m.substring(0, index) + m.substring(index + 4, m.length);
|
||||
m = m.substring(0, index) + m.substring(index + 5, m.length);
|
||||
index = m.indexOf("\x1b");
|
||||
}
|
||||
m = m.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "");
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,6 +7,7 @@ index_1.Logging.log("i", "am", { a: "an" }, 1000);
|
||||
index_1.Logging.error(new Error("fehler 001"));
|
||||
index_1.Logging.debug("Some Debug infos");
|
||||
index_1.Logging.errorMessage("i", "am", "an", "error");
|
||||
index_1.Logging.log("\x1b[31m\x1b[31m\x1b[31m\x1b[31m\x1b[31m\x1b[31m TEST \x1b[31m\x1b[31m\x1b[31m");
|
||||
index_1.Logging.stdout = false;
|
||||
for (let i = 0; i < 7000; i++) {
|
||||
index_1.Logging.log(crypto_1.randomBytes(50000).toString("hex"));
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;AAAA,mCAAkC;AAClC,mCAAqC;AAErC,eAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACnB,eAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;AAC1C,eAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AACvC,eAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAClC,eAAO,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,eAAO,CAAC,MAAM,GAAG,KAAK,CAAC;AACvB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7B,eAAO,CAAC,GAAG,CAAC,oBAAW,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;AAClD,CAAC"}
|
||||
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;AAAA,mCAAkC;AAClC,mCAAqC;AAErC,eAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACnB,eAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;AAC1C,eAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AACvC,eAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAClC,eAAO,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAE/C,eAAO,CAAC,GAAG,CAAC,gFAAgF,CAAC,CAAA;AAE7F,eAAO,CAAC,MAAM,GAAG,KAAK,CAAC;AACvB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7B,eAAO,CAAC,GAAG,CAAC,oBAAW,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA;AAClD,CAAC"}
|
@ -122,7 +122,7 @@ export class Logging {
|
||||
|
||||
let index = m.indexOf("\x1b");
|
||||
while (index >= 0) {
|
||||
m = m.substring(0, index) + m.substring(index + 4, m.length);
|
||||
m = m.substring(0, index) + m.substring(index + 5, m.length);
|
||||
index = m.indexOf("\x1b");
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,9 @@ Logging.log("i", "am", { a: "an" }, 1000);
|
||||
Logging.error(new Error("fehler 001"));
|
||||
Logging.debug("Some Debug infos");
|
||||
Logging.errorMessage("i", "am", "an", "error");
|
||||
|
||||
Logging.log("\x1b[31m\x1b[31m\x1b[31m\x1b[31m\x1b[31m\x1b[31m TEST \x1b[31m\x1b[31m\x1b[31m")
|
||||
|
||||
Logging.stdout = false;
|
||||
for (let i = 0; i < 7000; i++) {
|
||||
Logging.log(randomBytes(50000).toString("hex"))
|
||||
|
Loading…
Reference in New Issue
Block a user