rotatelog

package
v0.0.0-...-b81cc08 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OptFunc

type OptFunc func(opts *Opts)

func WithCurLogLinkPath

func WithCurLogLinkPath(linkPath string) OptFunc

func WithDeleteExpiredFile

func WithDeleteExpiredFile(maxAge time.Duration, fileWildcard string) OptFunc

WithDeleteExpiredFile Judge expired by last modify time cutoffTime = now - maxAge Only delete satisfying file wildcard filename

func WithMaxFileSize

func WithMaxFileSize(size int64) OptFunc

func WithRotateTime

func WithRotateTime(duration time.Duration) OptFunc

type Opts

type Opts struct {
	// contains filtered or unexported fields
}

type RotateLog

type RotateLog struct {
	// contains filtered or unexported fields
}

func NewRotateLog

func NewRotateLog(logPath string, opts ...OptFunc) (*RotateLog, error)

func (*RotateLog) Close

func (r *RotateLog) Close() error

func (*RotateLog) Write

func (r *RotateLog) Write(bytes []byte) (int, error)

Jump to

Keyboard shortcuts

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