Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileRotationOption ¶
type FileRotationOption struct {
	FileName   string
	MaxSize    int
	MaxAge     int
	MaxBackups int
	LocalTime  bool
	Compress   bool
}
    FileRotationOption provides all parameters for file rotation
type Option ¶
type Option func(*FileRotationOption)
func EnableCompression ¶
func EnableCompression() Option
EnableCompression is to enable old log file gzip compression. Defaults to false.
func EnableLocalTime ¶
func EnableLocalTime() Option
EnableLocalTime is to determine if the time used for formatting the timestamps in backup files is the computer's local time. The default is to use UTC time.
func WithMaxAge ¶
WithMaxAge provides way to adjust max age (in days). The default is not to remove old log files based on age.
func WithMaxBackups ¶
WithMaxBackups provides way to adjust max number of backups. Defaults to retain all old log files though MaxAge may still cause them to get deleted.
func WithMaxSize ¶
WithMaxSize provides way to adjust maxSize (in MBs). Defaults to 100 MBs.
 Click to show internal directories. 
   Click to hide internal directories.