|
лет назад: 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.