|
|
пре 5 година | |
|---|---|---|
| .. | ||
| ratelimiter | пре 5 година | |
| util | пре 5 година | |
| watch | пре 5 година | |
| winfile | пре 5 година | |
| .gitignore | пре 5 година | |
| .travis.yml | пре 5 година | |
| BUILD | пре 5 година | |
| CHANGES.md | пре 5 година | |
| Dockerfile | пре 5 година | |
| LICENSE.txt | пре 5 година | |
| Makefile | пре 5 година | |
| README.md | пре 5 година | |
| appveyor.yml | пре 5 година | |
| tail.go | пре 5 година | |
| tail_posix.go | пре 5 година | |
| tail_windows.go | пре 5 година | |
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.