@athenna/logger 5.19.0 → 5.20.0
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.
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ export class JsonFormatter extends Formatter {
|
|
|
13
13
|
const base = {
|
|
14
14
|
...(this.configs.defaults || {}),
|
|
15
15
|
level: this.level(),
|
|
16
|
+
msg: undefined,
|
|
16
17
|
date: new Date().toISOString(),
|
|
17
18
|
timestamp: Date.now(),
|
|
18
19
|
pid: this.pid(),
|
|
@@ -31,7 +32,10 @@ export class JsonFormatter extends Formatter {
|
|
|
31
32
|
if (Is.Error(message)) {
|
|
32
33
|
return this.handleExceptionLog(base, message.toAthennaException());
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
Object.keys(message).forEach(key => {
|
|
36
|
+
base[key] = message[key];
|
|
37
|
+
});
|
|
38
|
+
return JSON.stringify(base, this.getCircularReplacer());
|
|
35
39
|
}
|
|
36
40
|
handleExceptionLog(base, message) {
|
|
37
41
|
return JSON.stringify({
|