Adding removal of color codes
This commit is contained in:
parent
6a62f1168a
commit
e4ea3f660c
@ -105,6 +105,7 @@ class Logging {
|
|||||||
m = m.substring(0, index) + m.substring(index + 4, m.length);
|
m = m.substring(0, index) + m.substring(index + 4, m.length);
|
||||||
index = m.indexOf("\x1b");
|
index = m.indexOf("\x1b");
|
||||||
}
|
}
|
||||||
|
m = m.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "");
|
||||||
if (this.logFileLocation) {
|
if (this.logFileLocation) {
|
||||||
if ((!this.fileStream || !this.errorStream) && !this.writing) {
|
if ((!this.fileStream || !this.errorStream) && !this.writing) {
|
||||||
Logging.initializeFile();
|
Logging.initializeFile();
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "logger-perfcloud",
|
"name": "logger-perfcloud",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "out/index.js",
|
"main": "out/index.js",
|
||||||
"types": "out/index.d.ts",
|
"types": "out/index.d.ts",
|
||||||
|
@ -126,6 +126,8 @@ export class Logging {
|
|||||||
index = m.indexOf("\x1b");
|
index = m.indexOf("\x1b");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m = m.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, "");
|
||||||
|
|
||||||
if (this.logFileLocation) {
|
if (this.logFileLocation) {
|
||||||
if ((!this.fileStream || !this.errorStream) && !this.writing) {
|
if ((!this.fileStream || !this.errorStream) && !this.writing) {
|
||||||
Logging.initializeFile();
|
Logging.initializeFile();
|
||||||
|
Loading…
Reference in New Issue
Block a user