log

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LevelList = map[string]logrus.Level{
	"panic": logrus.PanicLevel,
	"fatal": logrus.FatalLevel,
	"error": logrus.ErrorLevel,
	"warn":  logrus.WarnLevel,
	"info":  logrus.InfoLevel,
	"debug": logrus.DebugLevel,
	"trace": logrus.TraceLevel,
}
View Source
var Logger *logrus.Logger

Functions

func GinLogFormatter

func GinLogFormatter(params gin.LogFormatterParams) string

func LoggerInit

func LoggerInit(level, LogOutput string)

func NewContextHook added in v1.0.2

func NewContextHook(levels ...logrus.Level) logrus.Hook

NewContextHook use to make an hook 根据上面的推断, 我们递归深度可以设置到5即可.

Types

type OutputOff added in v1.0.2

type OutputOff struct {
}

func (*OutputOff) Write added in v1.0.2

func (log *OutputOff) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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