zeddemore-logger 1.2.1 → 1.2.2
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/lib/zeddemore-logger.js +11 -0
- package/package.json +1 -1
package/lib/zeddemore-logger.js
CHANGED
|
@@ -35,6 +35,13 @@ function massageLogLevel(logLevel) {
|
|
|
35
35
|
return winstonLogLevelIdToName(logLevel);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Monkey patch console to allow unlimited depth with `console.dirp`
|
|
40
|
+
*/
|
|
41
|
+
function monkeyPatchConsole() {
|
|
42
|
+
console.dirp = (arguments) => console.dir(arguments, { depth: null });
|
|
43
|
+
}
|
|
44
|
+
|
|
38
45
|
/**
|
|
39
46
|
* Convert a log level ID to a Winston log level name
|
|
40
47
|
* @param levelId {number}
|
|
@@ -213,6 +220,10 @@ class ZeddemoreLogger {
|
|
|
213
220
|
return this.createLogger(loggerOptions);
|
|
214
221
|
}
|
|
215
222
|
|
|
223
|
+
enableConsoleDirp() {
|
|
224
|
+
monkeyPatchConsole();
|
|
225
|
+
}
|
|
226
|
+
|
|
216
227
|
#generateUuid() {
|
|
217
228
|
return uuid(null, null, null);
|
|
218
229
|
}
|