fix:gz files are compressed repeatedly every time tick (#3236)

This commit is contained in:
cy
2024-01-02 20:10:57 +08:00
committed by GitHub
parent 63bdf41d40
commit 4876ae0e2b

View File

@ -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