Go to file
Sridhar Ratnakumar f3593827b3 Merge pull request #20 from ActiveState/inotify_cleanup
add Cleanup function to close open inotify watches
2013-11-13 17:43:11 -08:00
cmd/gotail run 'go fmt' (and fix 'make fmt' in Makefile) 2013-11-13 17:38:23 -08:00
util replace the alarmist panic with Fatal 2013-10-11 18:19:43 -07:00
watch run 'go fmt' (and fix 'make fmt' in Makefile) 2013-11-13 17:38:23 -08:00
.gitignore remove logyard references and update README 2012-10-17 11:56:54 -07:00
CHANGES.md update change log 2013-11-13 17:37:03 -08:00
Dockerfile fulltest: run go install 2013-09-09 03:20:08 +00:00
LICENSE.txt add license and copyright 2013-01-07 12:54:49 -08:00
Makefile run 'go fmt' (and fix 'make fmt' in Makefile) 2013-11-13 17:38:23 -08:00
README.md update README 2013-08-09 15:15:40 -07:00
deps.json add deps.json for use with depman 2013-11-07 21:09:27 -08:00
rate.go option to limit the rate of reading lines from files 2013-07-11 17:28:18 -07:00
tail.go descriptive comment for the Cleanup function 2013-11-13 17:41:13 -08:00
tail_test.go add Cleanup function to close open inotify watches 2013-11-12 20:15:27 -08:00

README.md

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/ActiveState/tail/...