From 1d8d362638719f0b13e1698e395aed3a80a3b3bc Mon Sep 17 00:00:00 2001 From: cyruslo <710058301@qq.com> Date: Tue, 2 Jan 2024 01:05:57 +0800 Subject: [PATCH] fixed:gz files are compressed repeatedly every time tick --- 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