wowker / go-tail

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)
}

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/wowker/go-tail

About


Languages

Language:Go 98.6%Language:Dockerfile 1.0%Language:Makefile 0.4%