file

package
v0.0.0-...-c6e4f4a Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MixRotateFile

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

func NewMixRotateFile

func NewMixRotateFile(filename string, maxSize int, rotateTime time.Duration, maxAge int, maxBackups int) *MixRotateFile

func (*MixRotateFile) Close

func (l *MixRotateFile) Close() error

func (*MixRotateFile) Rotate

func (l *MixRotateFile) Rotate() error

func (*MixRotateFile) Write

func (l *MixRotateFile) Write(p []byte) (n int, err error)

type SizeRotateFile

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

func NewSizeRotateFile

func NewSizeRotateFile(filename string, maxSize int, maxBackups int, maxAge int) *SizeRotateFile

maxSize: the maximum size in megabytes of the log file before it gets rotated

func (*SizeRotateFile) Close

func (l *SizeRotateFile) Close() error

func (*SizeRotateFile) Rotate

func (l *SizeRotateFile) Rotate() error

func (*SizeRotateFile) Write

func (l *SizeRotateFile) Write(p []byte) (n int, err error)

type TimeRotateFile

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

func NewTimeRotateFile

func NewTimeRotateFile(filename string, rotateTime time.Duration, rotateCount int, rotateMaxAge int) (*TimeRotateFile, error)

rotateTime: the number of seconds between rotation

func (*TimeRotateFile) Close

func (l *TimeRotateFile) Close() error

func (*TimeRotateFile) Rotate

func (l *TimeRotateFile) Rotate() error

func (*TimeRotateFile) Write

func (l *TimeRotateFile) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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