Add logrotate conflict detection

This commit is contained in:
Theodor S. Midtlien
2026-06-02 11:07:27 +02:00
parent 16d1a4d550
commit 1e66db8ddb
4 changed files with 114 additions and 2 deletions
+2 -1
View File
@@ -1043,7 +1043,8 @@ func (g *BundleGenerator) addRotatedLogFiles(logDir string) {
return
}
pattern := filepath.Join(logDir, "client-*.log.gz")
// This regex will match both logs rotated by us and logrotate on linux
pattern := filepath.Join(logDir, "client*.log*.gz")
files, err := filepath.Glob(pattern)
if err != nil {
log.Warnf("failed to glob rotated logs: %v", err)