gotail: add -p argument to use polling
This commit is contained in:
parent
499e541b19
commit
0758578f6c
|
@ -14,6 +14,7 @@ func args2config() tail.Config {
|
|||
flag.IntVar(&config.Location, "n", 0, "tail from the last Nth location")
|
||||
flag.BoolVar(&config.Follow, "f", false, "wait for additional data to be appended to the file")
|
||||
flag.BoolVar(&config.ReOpen, "F", false, "follow, and track file rename/rotation")
|
||||
flag.BoolVar(&config.Poll, "p", false, "use polling, instead of inotify")
|
||||
flag.Parse()
|
||||
if config.ReOpen {
|
||||
config.Follow = true
|
||||
|
|
Loading…
Reference in New Issue