logger

package
v0.0.0-...-a59cf8e Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(filename string) *logger

func NewRotateFileHook

func NewRotateFileHook(config RotateFileConfig) (logrus.Hook, error)

Types

type RotateFileConfig

type RotateFileConfig struct {
	Filename   string
	MaxSize    int
	MaxBackups int
	MaxAge     int
	Compress   bool
	Level      logrus.Level
	Formatter  logrus.Formatter
}

type RotateFileHook

type RotateFileHook struct {
	Config RotateFileConfig
	// contains filtered or unexported fields
}

func (*RotateFileHook) Fire

func (hook *RotateFileHook) Fire(entry *logrus.Entry) (err error)

func (*RotateFileHook) Levels

func (hook *RotateFileHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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