Adding comilation for latest change
This commit is contained in:
parent
0fd6efac99
commit
5aaa4f6961
@ -97,6 +97,13 @@ class Logging {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
var m = "[" + LoggingTypes[type] + "][" + _getCallerFile() + "][" + new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '') + "]: " + mb;
|
var m = "[" + LoggingTypes[type] + "][" + _getCallerFile() + "][" + new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '') + "]: " + mb;
|
||||||
|
if (this.stdout)
|
||||||
|
console.log(consoleLogFormat + m + Reset);
|
||||||
|
let index = m.indexOf("\x1b");
|
||||||
|
while (index >= 0) {
|
||||||
|
m = m.substring(0, index) + m.substring(index + 4, m.length);
|
||||||
|
index = m.indexOf("\x1b");
|
||||||
|
}
|
||||||
if (this.logFileLocation) {
|
if (this.logFileLocation) {
|
||||||
if (!this.fileStream || !this.errorStream) {
|
if (!this.fileStream || !this.errorStream) {
|
||||||
await Logging.initializeFile();
|
await Logging.initializeFile();
|
||||||
@ -104,8 +111,6 @@ class Logging {
|
|||||||
Logging.writeMessageToFile(m, type === LoggingTypes.Error);
|
Logging.writeMessageToFile(m, type === LoggingTypes.Error);
|
||||||
}
|
}
|
||||||
Logging.events.emit("message", { type: type, message: mb });
|
Logging.events.emit("message", { type: type, message: mb });
|
||||||
if (this.stdout)
|
|
||||||
console.log(consoleLogFormat + m + Reset);
|
|
||||||
}
|
}
|
||||||
static writeMessageToFile(message, error) {
|
static writeMessageToFile(message, error) {
|
||||||
Logging.queue.push({ message: message.replace("\n", " "), error: error });
|
Logging.queue.push({ message: message.replace("\n", " "), error: error });
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "logger-perfcloud",
|
"name": "logger-perfcloud",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "out/index.js",
|
"main": "out/index.js",
|
||||||
"types": "out/index.d.ts",
|
"types": "out/index.d.ts",
|
||||||
|
Loading…
Reference in New Issue
Block a user