logrus

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRotation

func WithRotation(log *logrus.Logger, path string, duration time.Duration, maxCount uint, maxAge time.Duration) error

WithRotation enhances logrus log to be written to local filesystem, with file rotation path sets log's base path prefix duration sets the time between rotation. maxCount sets the number of files should be kept before it gets purged from the file system. maxAge sets the max age of a log file before it gets purged from the file system.

Types

type FieldLogger

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

func New

func (*FieldLogger) GetLogger

func (b *FieldLogger) GetLogger() logrus.FieldLogger

func (*FieldLogger) GetStdLogger

func (b *FieldLogger) GetStdLogger() *log.Logger

func (*FieldLogger) SetLogger

func (b *FieldLogger) SetLogger(l logrus.FieldLogger)

func (*FieldLogger) SetStdLogger

func (b *FieldLogger) SetStdLogger(l *log.Logger)

func (*FieldLogger) Write

func (b *FieldLogger) 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