Skip to content

Commit

Permalink
Add log output when log files are deleted with auto_removal feature #636
Browse files Browse the repository at this point in the history
  • Loading branch information
tomatod committed Dec 17, 2022
1 parent 69143c0 commit dce6021
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/inputs/logfile/tailersrc.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ func (ts *tailerSrc) cleanUp() {
if ts.autoRemoval {
if err := os.Remove(ts.tailer.Filename); err != nil {
log.Printf("W! [logfile] Failed to auto remove file %v: %v", ts.tailer.Filename, err)
} else {
log.Printf("I! [logfile] Successfully removed file %v with auto_removal feature", ts.tailer.Filename)
}
}
for _, clf := range ts.cleanUpFns {
Expand Down

0 comments on commit dce6021

Please sign in to comment.