小调整。
parent
29cada44de
commit
61e8a1652c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue