Skip to content

Commit 0fe5ba2

Browse files
committed
🔊 improve logging
1 parent 8e7213b commit 0fe5ba2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util/logger.util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ export const errorLogger = (
2020
): void => {
2121
// eslint-disable-next-line no-console
2222
console.error(
23-
`${config?.apiKey ? anonymizeKey(config.apiKey) : ""}: ${message}`,
23+
`${config?.apiKey ? `[${anonymizeKey(config.apiKey)}]` : ""}: ${message}`,
2424
args && args.length ? args : ""
2525
);
2626
};
2727

2828
export const warnLogger = (
29-
{ apiKey }: Config,
29+
config: Config | undefined,
3030
message: string,
3131
...args: unknown[]
3232
): void => {
3333
// eslint-disable-next-line no-console
3434
console.warn(
35-
`${anonymizeKey(apiKey)}: ${message}`,
35+
`${config?.apiKey ? `[${anonymizeKey(config.apiKey)}]` : ""}: ${message}`,
3636
args && args.length ? args : ""
3737
);
3838
};

0 commit comments

Comments
 (0)