Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCompress ¶
WithCompress determines if the rotated log files should be compressed using gzip. The default is not to perform compression.
func WithFileName ¶
WithFileName is the file to write logs to. Backup log files will be retained in the same directory. It uses <processname>-lumberjack.log in os.TempDir() if empty.
func WithMaxAge ¶
WithMaxAge is the maximum number of days to retain old log files based on the timestamp encoded in their filename. Note that a day is defined as 24 hours and may not exactly correspond to calendar days due to daylight savings, leap seconds, etc. The default is not to remove old log files based on age.
func WithMaxBackups ¶
WithMaxBackups is the maximum number of old log files to retain. The default is to retain all old log files (though MaxAge may still cause them to get deleted.)
func WithMaxSize ¶
WithMaxSize is the maximum size in megabytes of the log file before it gets rotated. It defaults to 100 megabytes.
Types ¶
This section is empty.