xlogger

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogLevelDebug = "debug"
	LogLevelInfo  = "info"
	LogLevelWarn  = "warn"
	LogLevelError = "error"
)

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(opts ...Option) log.Logger

NewLogger Constructor for kratos Logger

Types

type Logger

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

func (*Logger) Log

func (l *Logger) Log(level log.Level, keyvals ...interface{}) (err error)

type Option

type Option func(log *logrus.Logger)

func Formatter

func Formatter(formatter logrus.Formatter) Option

func Level

func Level(levelStr string) Option

Level Specify log level for logger, default to Info level.

func Output

func Output(w io.Writer) Option

Jump to

Keyboard shortcuts

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