Documentation ¶
Index ¶
Constants ¶
View Source
const ( MB = 1024 * 1024 Day = 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is a file which supports rotating automatically. It has max size and file will rotate if size exceeds max size. It has max age and max backups, so rotated files will be cleaned which is beneficial to space.
type Option ¶
type Option func(c *config)
Option sets some fields to config.
func WithMaxBackups ¶
WithMaxBackups sets max backups to config.
Click to show internal directories.
Click to hide internal directories.