We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1074c8 commit 4610951Copy full SHA for 4610951
src/util/logger.util.ts
@@ -62,18 +62,19 @@ const logger = (
62
`[${anonymizeKey(apiKey)}]`,
63
`[${source}]`,
64
message,
65
- args
+ ...args
66
)
67
);
68
} else {
69
- logFn(constructLogMessage(`[${source}]`, message, args));
+ logFn(constructLogMessage(`[${source}]`, message, ...args));
70
}
71
};
72
73
const constructLogMessage = (...args: unknown[]): string =>
74
`${args
75
.flat()
76
- .map((item: unknown) =>
77
- typeof item !== "string" ? JSON.stringify(item) : item
78
- )
+ .map((item: unknown) => {
+ if (Array.isArray(item) && item.length == 0) return;
+ return typeof item !== "string" ? JSON.stringify(item) : item;
79
+ })
80
.join(" ")}`;
0 commit comments