This commit is contained in:
WJQSERVER 2024-10-24 01:17:57 +08:00
parent d7949f625a
commit c0af779642
9 changed files with 37 additions and 20 deletions

View file

@ -96,7 +96,7 @@ func Close() {
}
func monitorLogSize(logFilePath string, maxLogsize int) {
var maxLogsizeBytes int64 = int64(maxLogsize) * 1024 * 1024 // 最大日志文件大小单位为MB
var maxLogsizeBytes int64 = int64(maxLogsize) * 1024 * 1024
for {
time.Sleep(120 * time.Minute) // 每120分钟检查一次日志文件大小
logFileMutex.Lock()