Tobias von Dewitz 362fdc9fb2 go modified | il y a 5 ans | |
---|---|---|
.. | ||
ratelimiter | il y a 5 ans | |
util | il y a 6 ans | |
watch | il y a 5 ans | |
winfile | il y a 6 ans | |
.gitignore | il y a 5 ans | |
.travis.yml | il y a 5 ans | |
CHANGES.md | il y a 6 ans | |
Dockerfile | il y a 6 ans | |
LICENSE.txt | il y a 6 ans | |
Makefile | il y a 6 ans | |
README.md | il y a 5 ans | |
appveyor.yml | il y a 6 ans | |
tail.go | il y a 5 ans | |
tail_posix.go | il y a 6 ans | |
tail_windows.go | il y a 6 ans |
A Go package striving to emulate the features of the BSD tail
program.
t, err := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true})
for line := range t.Lines {
fmt.Println(line.Text)
}
See API documentation.
Tail comes with full support for truncation/move detection as it is designed to work with log rotation tools.
go get github.com/hpcloud/tail/...
This package needs assistance for full Windows support.