Documentation ¶
Index ¶
- func NewRotate(opts ...*RotateOption) *lumberjack.Logger
- type RotateOption
- func ConfigOption(key string) (option *RotateOption, err error)
- func NewOption() *RotateOption
- func SetCompress(w bool) *RotateOption
- func SetFileName(l string) *RotateOption
- func SetLocalTime(w bool) *RotateOption
- func SetMaxAge(w int) *RotateOption
- func SetMaxBackup(w int) *RotateOption
- func SetMaxSize(w int) *RotateOption
- func (c *RotateOption) MergeOption(opts ...*RotateOption) *RotateOption
- func (c *RotateOption) SetCompress(w bool) *RotateOption
- func (c *RotateOption) SetFileName(l string) *RotateOption
- func (c *RotateOption) SetLocalTime(w bool) *RotateOption
- func (c *RotateOption) SetMaxAge(w int) *RotateOption
- func (c *RotateOption) SetMaxBackup(w int) *RotateOption
- func (c *RotateOption) SetMaxSize(w int) *RotateOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRotate ¶
func NewRotate(opts ...*RotateOption) *lumberjack.Logger
Types ¶
type RotateOption ¶
type RotateOption struct { FileName string MaxSize int MaxAge int MaxBackups int Compress bool LocalTime bool }
Config ...
func NewOption ¶
func NewOption() *RotateOption
func SetCompress ¶
func SetCompress(w bool) *RotateOption
func SetFileName ¶
func SetFileName(l string) *RotateOption
func SetLocalTime ¶
func SetLocalTime(w bool) *RotateOption
func SetMaxAge ¶
func SetMaxAge(w int) *RotateOption
func SetMaxBackup ¶
func SetMaxBackup(w int) *RotateOption
func SetMaxSize ¶
func SetMaxSize(w int) *RotateOption
func (*RotateOption) MergeOption ¶
func (c *RotateOption) MergeOption(opts ...*RotateOption) *RotateOption
func (*RotateOption) SetCompress ¶
func (c *RotateOption) SetCompress(w bool) *RotateOption
func (*RotateOption) SetFileName ¶
func (c *RotateOption) SetFileName(l string) *RotateOption
func (*RotateOption) SetLocalTime ¶
func (c *RotateOption) SetLocalTime(w bool) *RotateOption
func (*RotateOption) SetMaxAge ¶
func (c *RotateOption) SetMaxAge(w int) *RotateOption
func (*RotateOption) SetMaxBackup ¶
func (c *RotateOption) SetMaxBackup(w int) *RotateOption
func (*RotateOption) SetMaxSize ¶
func (c *RotateOption) SetMaxSize(w int) *RotateOption
Click to show internal directories.
Click to hide internal directories.