hpcloud / tail

Go package for reading from continously updated files (tail -f)
MIT License
2.7k stars 502 forks source link

fsnotify doesn't work with Windows, polling does #181

Open tommyblue opened 3 years ago

tommyblue commented 3 years ago

The simple example in the README doesn't work with Windows 10 Pro x64 (Version 10.0.19042 Build 19042). Adding Poll: true, insted, works:

t, err := tail.TailFile(fpath, tail.Config{Follow: true, Poll: true})
for line := range t.Lines {
    fmt.Println(line.Text)
}

I think you could mention it in the README

Licoy commented 2 years ago

@tommyblue I also encountered this problem, but now I have used the system command to solve it and developed a dependency. You can refer to: https://github.com/Licoy/stail

ericwgr commented 11 months ago

thanks