Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + var Local = clockFn(time.Now) + var UTC = clockFn(func() time.Time { ... }) + type Clock interface + Now func() time.Time + type Event interface + Type func() EventType + type EventType int + const FileRotatedEventType + const InvalidEventType + type FileRotatedEvent struct + func (e *FileRotatedEvent) CurrentFile() string + func (e *FileRotatedEvent) PreviousFile() string + func (e *FileRotatedEvent) Type() EventType + type Handler interface + Handle func(Event) + type HandlerFunc func(Event) + func (h HandlerFunc) Handle(e Event) + type Option interface + Name func() string + Value func() interface{} + func ForceNewFile() Option + func WithClock(c Clock) Option + func WithHandler(h Handler) Option + func WithLinkName(s string) Option + func WithLocation(loc *time.Location) Option + func WithMaxAge(d time.Duration) Option + func WithRotationCount(n uint) Option + func WithRotationSize(s int64) Option + func WithRotationTime(d time.Duration) Option + type RotateLogs struct + func New(p string, options ...Option) (*RotateLogs, error) + func (rl *RotateLogs) Close() error + func (rl *RotateLogs) CurrentFileName() string + func (rl *RotateLogs) Rotate() error + func (rl *RotateLogs) Write(p []byte) (n int, err error)