Go to file
Sridhar Ratnakumar 1faae64bdb Merge pull request #10 from ActiveState/rate_limiting
option to limit the rate of reading lines from files
2013-07-11 18:35:26 -07:00
cmd/gotail gotail: add -p argument to use polling 2013-05-29 15:07:53 -07:00
watch update readme, comments; gofmt 2013-05-29 16:32:01 -07:00
.gitignore remove logyard references and update README 2012-10-17 11:56:54 -07:00
CHANGES.md support Follow=false 2013-05-30 13:18:46 -07:00
LICENSE.txt add license and copyright 2013-01-07 12:54:49 -08:00
Makefile allow the user to control the GOPATH 2013-01-07 12:56:25 -08:00
README.md update readme, comments; gofmt 2013-05-29 16:32:01 -07:00
rate.go option to limit the rate of reading lines from files 2013-07-11 17:28:18 -07:00
tail.go option to limit the rate of reading lines from files 2013-07-11 17:28:18 -07:00
tail_test.go option to limit the rate of reading lines from files 2013-07-11 17:28:18 -07: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/...

TODO

  • Arbitrary values for Location
  • Location could be specified in both lines and bytes metrics.