Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRotateFileHook ¶
func NewRotateFileHook(config *RotateFileConfig) logrus.Hook
func NewRotateLogHook ¶
func NewRotateLogHook(config *RotateLogConfig) logrus.Hook
Types ¶
type CustomFormatter ¶
type RotateFileConfig ¶
type RotateFileConfig struct { MaxSize int // default to 100 megabytes MaxAge int // default not to remove old log MaxBackups int // default to retain all old log files LocalTime bool // default to use UTC time Compress bool // default not to perform compression Filename string Level logrus.Level Formatter logrus.Formatter }
RotateFileHook's config
type RotateFileHook ¶
type RotateFileHook struct {
// contains filtered or unexported fields
}
Write log into files (split logs to files manually)
func (*RotateFileHook) Levels ¶
func (r *RotateFileHook) Levels() []logrus.Level
type RotateLogConfig ¶
type RotateLogConfig struct { MaxAge time.Duration RotationTime time.Duration LocalTime bool Filepath string Filename string // without ext ForceNewFile bool Level logrus.Level Formatter logrus.Formatter }
RotateLogHook's config
type RotateLogHook ¶
type RotateLogHook struct {
// contains filtered or unexported fields
}
Write log into files (split logs to files automatically)
func (*RotateLogHook) Levels ¶
func (r *RotateLogHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.