nightingale/vendor/github.com/hpcloud/tail
710leo 5f00489392 init project 2020-03-11 18:25:20 +08:00
..
ratelimiter init project 2020-03-11 18:25:20 +08:00
util init project 2020-03-11 18:25:20 +08:00
watch init project 2020-03-11 18:25:20 +08:00
winfile init project 2020-03-11 18:25:20 +08:00
.gitignore init project 2020-03-11 18:25:20 +08:00
.travis.yml init project 2020-03-11 18:25:20 +08:00
CHANGES.md init project 2020-03-11 18:25:20 +08:00
Dockerfile init project 2020-03-11 18:25:20 +08:00
LICENSE.txt init project 2020-03-11 18:25:20 +08:00
Makefile init project 2020-03-11 18:25:20 +08:00
README.md init project 2020-03-11 18:25:20 +08:00
appveyor.yml init project 2020-03-11 18:25:20 +08:00
tail.go init project 2020-03-11 18:25:20 +08:00
tail_posix.go init project 2020-03-11 18:25:20 +08:00
tail_windows.go init project 2020-03-11 18:25:20 +08:00

README.md

Build Status Build status

Go package for tail-ing files

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.

Log rotation

Tail comes with full support for truncation/move detection as it is designed to work with log rotation tools.

Installing

go get github.com/hpcloud/tail/...

Windows support

This package needs assistance for full Windows support.