NYTimes/logrotate

Name: logrotate

Owner: The New York Times

Description: null

Created: 2015-12-15 18:20:09.0

Updated: 2018-05-14 11:42:14.0

Pushed: 2017-08-24 15:46:50.0

Homepage: null

Size: 7

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.