Skip to content

Commit 1808089

Browse files
committed
fix: add fallback category for logging
1 parent 190e64a commit 1808089

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/src/addon_manager/services/logging.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export const logger = winston.createLogger({
2525
winston.format.errors({ stack: true }),
2626
winston.format.printf((message) => {
2727
const level = padText(message.level, 9);
28-
const category = padText(message.defaultMeta.category, 18);
28+
const category = padText(
29+
message?.defaultMeta?.category ?? "GENERAL",
30+
18
31+
);
2932
if (typeof message.message === "object")
3033
return `[${
3134
message.timestamp

0 commit comments

Comments
 (0)