badmfck-api-server 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,9 +83,14 @@ class LogService extends BaseService_1.BaseService {
|
|
83
83
|
const msg = log.data[0];
|
84
84
|
const optional = log.data[1];
|
85
85
|
let text = this.createText(msg);
|
86
|
+
let source = "";
|
87
|
+
if (text.startsWith("${") && text.endsWith("}") && text.indexOf(".js") !== -1) {
|
88
|
+
source = text.substring(2, text.length - 1);
|
89
|
+
text = "";
|
90
|
+
}
|
86
91
|
if (optional) {
|
87
92
|
for (let i of optional)
|
88
|
-
text += ", " + this.createText(
|
93
|
+
text += ", " + this.createText(i);
|
89
94
|
}
|
90
95
|
const d = new Date();
|
91
96
|
const logitem = {
|
@@ -93,10 +98,11 @@ class LogService extends BaseService_1.BaseService {
|
|
93
98
|
id: ((+new Date()) - this.epoch),
|
94
99
|
text: text,
|
95
100
|
time: d.getTime(),
|
96
|
-
date: this.createDate(d)
|
101
|
+
date: this.createDate(d),
|
102
|
+
source: source
|
97
103
|
};
|
98
104
|
if (this.options.output)
|
99
|
-
this.options.output(logitem.level + " > " + logitem.date + " > " + text);
|
105
|
+
this.options.output(logitem.source + " > " + logitem.level + " > " + logitem.date + " > " + text);
|
100
106
|
exports.S_LOG_CREATED.invoke(logitem);
|
101
107
|
this.log.push(logitem);
|
102
108
|
let limit = this.options.stackSize ?? 1000;
|