Skip to content

Commit

Permalink
Attempt to reopen files that have gone missing
Browse files Browse the repository at this point in the history
  • Loading branch information
DRuggeri committed Nov 17, 2020
1 parent 2e49949 commit 7e73c19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bind_query_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func main() {

go func(*[]*chan string) {
info := &tail.SeekInfo{Offset: fi.Size(), Whence: 0}
t, _ := tail.TailFile(*bindQueryLogFile, tail.Config{Follow: true, Location: info})
t, _ := tail.TailFile(*bindQueryLogFile, tail.Config{Follow: true, ReOpen: true, Location: info})
for line := range t.Lines {
log.Debugln("Read: ", line)
for _, consumer := range consumers {
Expand Down

0 comments on commit 7e73c19

Please sign in to comment.