tree: 5522fb21b9468a39d88a25c672b0d9f919b1ebea [search]
  1. ratelimiter/
  2. util/
  3. watch/
  4. winfile/
  5. .gitignore
  6. .travis.yml
  7. appveyor.yml
  8. CHANGES.md
  9. Dockerfile
  10. LICENSE.txt
  11. Makefile
  12. README.md
  13. tail.go
  14. tail_posix.go
  15. tail_windows.go
vendor/github.com/hpcloud/tail/README.md

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.