rotate

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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 ConfigOption

func ConfigOption(key string) (option *RotateOption, err error)

RawConfig ...

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL