Skip to content

Commit

Permalink
fixed:gz files are compressed repeatedly every time tick
Browse files Browse the repository at this point in the history
  • Loading branch information
cyruslo committed Jan 1, 2024
1 parent 63bdf41 commit 1d8d362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os/glog/glog_logger_rotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d8d362

Please sign in to comment.