Go to file
loveshell ff96e4fb6a change 2021-10-13 21:28:19 +08:00
Godeps Godep workspace -> vendor directory 2016-04-07 16:14:15 -07:00
cmd/gotail change 2021-10-13 21:28:19 +08:00
ratelimiter ratelimit: fix bucket collection eviction 2016-12-21 19:03:32 -08:00
util change 2021-10-13 21:28:19 +08:00
vendor/gopkg.in fix fsnotify relocation 2018-03-21 11:19:57 -04:00
watch change 2021-10-13 21:28:19 +08:00
winfile add FILE_SHARE_DELETE flag when opening file 2014-07-28 16:38:02 +03:00
.gitignore remove logyard references and update README 2012-10-17 11:56:54 -07:00
.travis.yml fix fsnotify relocation 2018-03-21 11:19:57 -04:00
CHANGES.md Updates licensing and all the header comments 2016-04-26 15:47:46 -07:00
Dockerfile Fix imports 2015-09-30 17:50:49 +03:00
LICENSE.txt Updates licensing and all the header comments 2016-04-26 15:47:46 -07:00
Makefile Fixes race in test 2016-04-08 11:47:25 -07:00
README.md Update README.md 2017-08-14 09:06:53 -07:00
appveyor.yml Adds appveyor for windows build 2016-04-27 16:29:40 -07:00
go.mod change 2021-10-13 21:28:19 +08:00
go.sum change 2021-10-13 21:28:19 +08:00
tail.go change 2021-10-13 21:28:19 +08:00
tail_posix.go Merge branch 'openbsd' of https://github.com/ajacoutot/tail into ajacoutot-openbsd 2015-11-02 12:49:12 -08:00
tail_test.go change 2021-10-13 21:28:19 +08:00
tail_windows.go change 2021-10-13 21:28:19 +08:00

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.