Skip to content

Commit

Permalink
updated compressLogFile
Browse files Browse the repository at this point in the history
  • Loading branch information
PAKalucki committed Sep 12, 2024
1 parent 468c254 commit d45742e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logrotate.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func rotateLogFiles(logEntry LogEntry) {
log.Printf("Rotated log file: %s to %s", file, rotatedFilePath)

if logEntry.Condition.Compress == nil || *logEntry.Condition.Compress {
if err := compressLogFile(rotatedFilePath); err != nil {
if err := compressLogFile(rotatedFilePath, "gzip"); err != nil { // todo read me from config
log.Printf("Failed to compress rotated log file %s: %v", rotatedFilePath, err)
} else {
log.Printf("Compressed log file: %s", rotatedFilePath)
Expand Down

0 comments on commit d45742e

Please sign in to comment.