https://github.com/bububa/tail
Go package for reading from continously updated files (tail -f)
https://github.com/bububa/tail
Last synced: 5 months ago
JSON representation
Go package for reading from continously updated files (tail -f)
- Host: GitHub
- URL: https://github.com/bububa/tail
- Owner: bububa
- License: other
- Fork: true (hpcloud/tail)
- Created: 2014-06-18T07:53:00.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-18T09:28:18.000Z (about 12 years ago)
- Last Synced: 2024-12-16T20:32:28.555Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 219 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/ActiveState/tail)
# Go package for tail-ing files
A Go package striving to emulate the features of the BSD `tail` program.
```Go
t, err := tail.TailFile("/var/log/nginx.log", tail.Config{Follow: true})
for line := range t.Lines {
fmt.Println(line.Text)
}
```
See [API documentation](http://godoc.org/github.com/ActiveState/tail).
## 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/...