open-nomad/vendor/github.com/hpcloud/tail
Seth Hoenig 435c0d9fc8 deps: Switch to Go modules for dependency management
This PR switches the Nomad repository from using govendor to Go modules
for managing dependencies. Aspects of the Nomad workflow remain pretty
much the same. The usual Makefile targets should continue to work as
they always did. The API submodule simply defers to the parent Nomad
version on the repository, keeping the semantics of API versioning that
currently exists.
2020-06-02 14:30:36 -05:00
..
ratelimiter deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
util Tests and handle conn close behavior better 2016-07-12 10:18:48 -06:00
watch Update tail, x/sys, and fsnotify deps 2017-11-30 15:52:43 -08:00
winfile deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
.gitignore deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
.travis.yml deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
appveyor.yml deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
CHANGES.md deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
Dockerfile deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
LICENSE.txt Tests and handle conn close behavior better 2016-07-12 10:18:48 -06:00
Makefile deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
README.md deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
tail.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
tail_posix.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00
tail_windows.go deps: Switch to Go modules for dependency management 2020-06-02 14:30:36 -05:00

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.