From 9a65dae6a24d49d284adde7fd925fdead0fc3136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sat, 16 Nov 2024 20:32:52 +0800 Subject: [PATCH] fix: #531 --- src/common/log.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/log.ts b/src/common/log.ts index 4a011c0a..42741beb 100644 --- a/src/common/log.ts +++ b/src/common/log.ts @@ -36,7 +36,7 @@ export class LogWrapper { this.logger = winston.createLogger({ level: 'debug', format: format.combine( - format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), + format.timestamp({ format: 'MM-DD HH:mm:ss' }), format.printf(({ timestamp, level, message, ...meta }) => { const userInfo = meta.userInfo ? `${meta.userInfo} | ` : ''; return `${timestamp} [${level}] ${userInfo}${message}`; @@ -61,7 +61,7 @@ export class LogWrapper { ] }); - this.setLogSelfInfo({ nick: '', uin: '', uid: '' }); + this.setLogSelfInfo({ nick: '', uid: '' }); this.cleanOldLogs(logDir); } @@ -111,8 +111,8 @@ export class LogWrapper { }); } - setLogSelfInfo(selfInfo: { nick: string, uin: string, uid: string }) { - const userInfo = `${selfInfo.nick}(${selfInfo.uin})`; + setLogSelfInfo(selfInfo: { nick: string, uid: string }) { + const userInfo = `${selfInfo.nick}`; this.logger.defaultMeta = { userInfo }; }