mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
fix:gz files are compressed repeatedly every time tick (#3236)
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user