From 61e8a1652c76f19338fe111d365ec4f263dcc107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 5 Feb 2025 13:10:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/utils/util.logger.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/utils/util.logger.js b/packages/core/src/utils/util.logger.js index 7d1ad00..13c9353 100644 --- a/packages/core/src/utils/util.logger.js +++ b/packages/core/src/utils/util.logger.js @@ -23,14 +23,13 @@ function getDefaultConfigBasePath () { const basePath = getDefaultConfigBasePath() // 通用日志配置 -const maxLogFileSizeMultiple = 1024 * 1024 * (configFromFiles.app.maxLogFileSizeUnit === 'GB' ? 1024 : 1) // 目前单位只有GB和MB const appenderConfig = { type: 'file', pattern: 'yyyy-MM-dd', compress: true, // 压缩日志文件 keepFileExt: true, // 保留日志文件扩展名为 .log backups: configFromFiles.app.keepLogFileCount, // 保留日志文件数 - maxLogSize: (configFromFiles.app.maxLogFileSize || 0) * maxLogFileSizeMultiple, + maxLogSize: (configFromFiles.app.maxLogFileSize || 0) * 1024 * 1024 * (configFromFiles.app.maxLogFileSizeUnit === 'GB' ? 1024 : 1), // 目前单位只有GB和MB } let log = null