From a81fa5b8e05d435e004d32c4c831cc307258a2a2 Mon Sep 17 00:00:00 2001 From: ChengLei Shao Date: Mon, 18 Mar 2024 14:32:37 +0800 Subject: [PATCH] chore: system logger with error stack (#3747) --- packages/core/logger/src/system-logger.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/logger/src/system-logger.ts b/packages/core/logger/src/system-logger.ts index bc7fa28874..76ed33d2f8 100644 --- a/packages/core/logger/src/system-logger.ts +++ b/packages/core/logger/src/system-logger.ts @@ -49,11 +49,12 @@ class SystemLoggerTransport extends Transport { } log(info: any, callback: any) { - const { level, message, reqId, app, [SPLAT]: args } = info; + const { level, message, reqId, app, stack, [SPLAT]: args } = info; const logger = level === 'error' && this.errorLogger ? this.errorLogger : this.logger; const { module, submodule, method, ...meta } = args?.[0] || {}; logger.log({ level, + stack, message, meta, module: module || info['module'] || '',