feat: single-line pretty log output

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
liuyun 2026-10-10 21:52:34 +08:00
parent f6fddb4a53
commit 43dacdba11

View File

@ -14,7 +14,7 @@ export function createLoggerModule(): DynamicModule {
const filePath = process.env.LOG_FILE_PATH ?? 'logs/app.log';
const stdoutTarget = pretty
? { target: 'pino-pretty', options: { colorize: true, translateTime: 'SYS:yyyy-mm-dd HH:MM:ss.l' } }
? { target: 'pino-pretty', options: { colorize: true, translateTime: 'SYS:yyyy-mm-dd HH:MM:ss.l', singleLine: true } }
: { target: 'pino/file', options: { destination: 1 } };
const targets: any[] = [stdoutTarget];