All Projects → nytimes → logrotate

nytimes / logrotate

Licence: Apache-2.0 license
No description, website, or topics provided.

Programming Languages

go
31211 projects - #10 most used programming language

logrotate file

GoDoc Build Status

logrotated can be configured to send a SIGHUP signal to a process after rotating it's logs. This library reopens the underlying os.File when a SIGHUP is received by the app.

Example

This is will enable all log calls to output to the log file without interruption when logrotated rotates the file.

logfile, err := logrotate.NewFile("/log/path/here")
if err != nil {
	log.Fatal(err)
}

log.SetOutput(logfile)

ref: http://linux.die.net/man/8/logrotate

Install

Notice the capitalization!

go get github.com/NYTimes/logrotate

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].