From 4876ae0e2b269f51cb42d27ce498a425e4a2e52a Mon Sep 17 00:00:00 2001 From: cy <710058301@qq.com> Date: Tue, 2 Jan 2024 20:10:57 +0800 Subject: [PATCH] fix:gz files are compressed repeatedly every time tick (#3236) --- os/glog/glog_logger_rotate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/glog/glog_logger_rotate.go b/os/glog/glog_logger_rotate.go index 61192df5ba1..4df261d1a53 100644 --- a/os/glog/glog_logger_rotate.go +++ b/os/glog/glog_logger_rotate.go @@ -153,7 +153,7 @@ func (l *Logger) rotateChecksTimely(ctx context.Context) { ) for _, file := range files { // ignore backup file - if gregex.IsMatchString(`.+\.\d{20}\.log`, gfile.Basename(file)) { + if gregex.IsMatchString(`.+\.\d{20}\.log`, gfile.Basename(file)) || gfile.ExtName(file) == "gz" { continue } // ignore not matching file