nightingale/vendor/github.com/hpcloud/tail
Ulric Qin be1e161f31 add vendor Makefile 2020-09-27 19:27:10 +08:00
..
ratelimiter add vendor 2020-09-26 17:02:52 +08:00
util add vendor 2020-09-26 17:02:52 +08:00
watch add vendor 2020-09-26 17:02:52 +08:00
winfile add vendor 2020-09-26 17:02:52 +08:00
.gitignore add vendor 2020-09-26 17:02:52 +08:00
.travis.yml add vendor 2020-09-26 17:02:52 +08:00
CHANGES.md add vendor 2020-09-26 17:02:52 +08:00
Dockerfile add vendor 2020-09-26 17:02:52 +08:00
LICENSE.txt add vendor 2020-09-26 17:02:52 +08:00
Makefile add vendor Makefile 2020-09-27 19:27:10 +08:00
README.md add vendor 2020-09-26 17:02:52 +08:00
appveyor.yml add vendor 2020-09-26 17:02:52 +08:00
tail.go add vendor 2020-09-26 17:02:52 +08:00
tail_posix.go add vendor 2020-09-26 17:02:52 +08:00
tail_windows.go add vendor 2020-09-26 17:02:52 +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.