Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RotateFileConfig ¶
type RotateFileConfig struct { Filename string MaxSize int MaxBackups int MaxAge int Level logrus.Level Formatter logrus.Formatter LocalTime bool Compress bool }
RotateFileConfig holds basic information for using lumberjack and logrus hooks
type RotateFileHook ¶
type RotateFileHook struct { Config RotateFileConfig LogWriter *lumberjack.Logger }
RotateFileHook holds hook information for logrus
func NewRotateFileHook ¶
func NewRotateFileHook(config RotateFileConfig) (*RotateFileHook, error)
NewRotateFileHook initialize a new logrus.Hook or return an error
func (*RotateFileHook) Fire ¶
func (hook *RotateFileHook) Fire(entry *logrus.Entry) (err error)
Fire implements the Fire interface method of logrus Hook
func (*RotateFileHook) Levels ¶
func (hook *RotateFileHook) Levels() []logrus.Level
Levels implements the Levels interface method of logrus Hook
func (*RotateFileHook) Rotate ¶
func (hook *RotateFileHook) Rotate() error
Rotate by request a log file (calling of SIGHUP for example)
Click to show internal directories.
Click to hide internal directories.