unnbound-logger-sdk 3.0.35 → 3.0.36
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/dist/logger.js +3 -1
- package/package.json +1 -1
package/dist/logger.js
CHANGED
|
@@ -13,6 +13,8 @@ const levels = new Set(['debug', 'info', 'warn', 'error']);
|
|
|
13
13
|
const formatLevel = (level) => ({ level });
|
|
14
14
|
// TODO: Check if there is a better way to encode the log object.
|
|
15
15
|
const formatLog = (log, visited = new WeakSet()) => {
|
|
16
|
+
if (!log || typeof log !== 'object')
|
|
17
|
+
return log;
|
|
16
18
|
// Prevent infinite loops from circular references
|
|
17
19
|
if (visited.has(log))
|
|
18
20
|
return log;
|
|
@@ -39,7 +41,7 @@ const formatLog = (log, visited = new WeakSet()) => {
|
|
|
39
41
|
? formatLog(item, visited)
|
|
40
42
|
: item);
|
|
41
43
|
}
|
|
42
|
-
else if (typeof value === 'object') {
|
|
44
|
+
else if (value !== null && typeof value === 'object') {
|
|
43
45
|
log[key] = formatLog(value, visited);
|
|
44
46
|
}
|
|
45
47
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unnbound-logger-sdk",
|
|
3
3
|
"description": "A structured logging library with TypeScript support using Pino. Provides consistent, well-typed logging with automatic logId, workflowId, traceId, and deploymentId tracking across operational contexts.",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.36",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|