zfs-localpv/vendor/github.com/hpcloud/tail
Pawan c3c5eb1794 test(zfspv): vendor for ginkgo test code
Signed-off-by: Pawan <pawan@mayadata.io>
2019-12-04 13:17:04 +05:30
..
ratelimiter test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
util test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
watch test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
winfile test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
.gitignore test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
.travis.yml test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
appveyor.yml test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
CHANGES.md test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
Dockerfile test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
LICENSE.txt test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
Makefile test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
README.md test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
tail.go test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
tail_posix.go test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30
tail_windows.go test(zfspv): vendor for ginkgo test code 2019-12-04 13:17:04 +05:30

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.