@autofleet/logger 1.2.2-beta-2 → 1.2.2-beta-4
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/index.js +11 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -29,7 +29,16 @@ const getLevel = (logLevel) => {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const addLogsSize = winston.format((info) => {
|
|
32
|
-
|
|
32
|
+
const log = {};
|
|
33
|
+
Object.keys(info).map(key => log[key] = 'OVERSIZED LOG');
|
|
34
|
+
return {
|
|
35
|
+
...log,
|
|
36
|
+
message: 'WARNING: Found oversized log',
|
|
37
|
+
stackTrace: new Error().stack,
|
|
38
|
+
originalMessage: info.message,
|
|
39
|
+
level: info.level,
|
|
40
|
+
};
|
|
41
|
+
/*
|
|
33
42
|
const log = { ...info };
|
|
34
43
|
const logSize = sizeof(info);
|
|
35
44
|
log.logSize = logSize;
|
|
@@ -38,6 +47,7 @@ const addLogsSize = winston.format((info) => {
|
|
|
38
47
|
}
|
|
39
48
|
|
|
40
49
|
return { ...info, logSize };
|
|
50
|
+
*/
|
|
41
51
|
});
|
|
42
52
|
|
|
43
53
|
const enumerateErrorFormat = winston.format((info) => {
|