Documentation ¶
Overview ¶
Package rotator implements a simple logfile rotator. Logs are read from an io.Reader and are written to a file until they reach a specified size. The log is then gzipped to another file and truncated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rotator ¶
type Rotator struct {
// contains filtered or unexported fields
}
A Rotator writes input to a file, splitting it up into gzipped chunks once the filesize reaches a certain threshold.
func New ¶
New returns a new Rotator. The rotator can be used either by reading input from an io.Reader by calling Run, or writing directly to the Rotator with Write.
Click to show internal directories.
Click to hide internal directories.