Go to file
Sridhar Ratnakumar 5ccafcc3d6 fixes on top of Florian's truncation detection (1ff299bc2)
* initialize `Size` with the then-size of the file when ChangeEvents
  is called. remember that this function is expected to be called many
  times, one after another. this also passes the TestReSeekInotify
  test.

* do not ignore errors from os.Stat. we panic errors like these now,
  but ideally should switch to tomb.Tomb for letting the user handle
  them.
2013-05-28 12:31:46 -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 add change log 2013-05-28 11:06:11 -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 Add support for file truncation in InotifyFileWatcher 2013-05-28 11:59:03 -07:00
tail_test.go fix truncation tests 2013-05-28 12:28:56 -07:00
watch.go fixes on top of Florian's truncation detection (1ff299bc2) 2013-05-28 12:31:46 -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