From d45742e9725be4647c467a6f61a5381b9f870620 Mon Sep 17 00:00:00 2001 From: Przemyslaw Kalucki Date: Thu, 12 Sep 2024 13:37:34 +0200 Subject: [PATCH] updated compressLogFile --- logrotate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logrotate.go b/logrotate.go index 198c4e5..bfad045 100644 --- a/logrotate.go +++ b/logrotate.go @@ -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)