Go to file
Sridhar Ratnakumar b664e9fc9d Merge pull request #6 from srid/bug99139_copytruncate
copytruncate support,

truncation detection for both inotify and polling file watchers along with test cases, plus a fix for issue #5.
2013-05-28 14:03:12 -07:00
cmd/gotail allow the user to control the GOPATH 2013-01-07 12:56:25 -08:00
.gitignore remove logyard references and update README 2012-10-17 11:56:54 -07:00
CHANGES.md update change log, gofmt and remove debug prints 2013-05-28 14:01:32 -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 README: link to API docs 2013-03-10 15:01:42 -07:00
tail.go update change log, gofmt and remove debug prints 2013-05-28 14:01:32 -07:00
tail_test.go update change log, gofmt and remove debug prints 2013-05-28 14:01:32 -07:00
watch.go update change log, gofmt and remove debug prints 2013-05-28 14:01:32 -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.

Installing

go get github.com/ActiveState/tail

Building

To build and test the package,

make test

To build the toy command-line program gotail,

cd cmd/gotail
make
./gotail -h

TODO

  • Support arbitrary values for Location