packer-cn/vendor/github.com/ActiveState/tail
Chris Bednarski dbdb988634 Vendor all dependencies 2016-02-04 17:33:36 -08:00
..
cmd/gotail Vendor all dependencies 2016-02-04 17:33:36 -08:00
ratelimiter Vendor all dependencies 2016-02-04 17:33:36 -08:00
util Vendor all dependencies 2016-02-04 17:33:36 -08:00
watch Vendor all dependencies 2016-02-04 17:33:36 -08:00
winfile Vendor all dependencies 2016-02-04 17:33:36 -08:00
.gitignore Vendor all dependencies 2016-02-04 17:33:36 -08:00
.travis.yml Vendor all dependencies 2016-02-04 17:33:36 -08:00
CHANGES.md Vendor all dependencies 2016-02-04 17:33:36 -08:00
Dockerfile Vendor all dependencies 2016-02-04 17:33:36 -08:00
LICENSE.txt Vendor all dependencies 2016-02-04 17:33:36 -08:00
Makefile Vendor all dependencies 2016-02-04 17:33:36 -08:00
README.md Vendor all dependencies 2016-02-04 17:33:36 -08:00
deps.json Vendor all dependencies 2016-02-04 17:33:36 -08:00
tail.go Vendor all dependencies 2016-02-04 17:33:36 -08:00
tail_posix.go Vendor all dependencies 2016-02-04 17:33:36 -08:00
tail_windows.go Vendor all dependencies 2016-02-04 17:33:36 -08:00

README.md

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.