mlog

package
v0.0.0-...-beacba6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel level = iota + 1
	InfoLevel
	WarnLevel
	ErrorLevel
	PanicLevel
	NaN
)

Variables

This section is empty.

Functions

func NewMultiFileWriter

func NewMultiFileWriter() (writer, error)

func NewTerminalWriter

func NewTerminalWriter() writer

func ParseLevel

func ParseLevel(levelStr string) (lvl level)

ParseLevel 给定描述日志等级的字符串,返回其对应的 Level。

func ReadConfig

func ReadConfig() (*fileWriterConfig, *viper.Viper, error)

Types

type Logger

type Logger interface {
	Debug(msg string)
	Debugf(format, msg string)
	Info(msg string)
	Infof(format, msg string)
	Warn(msg string)
	Warnf(format, msg string)
	Error(msg string)
	Errorf(format, msg string)
	Panic(msg string)
	Panicf(format, msg string)
	Stop() error
}

func GetLogger

func GetLogger(module string, lvl level, printPath ...bool) Logger

Jump to

Keyboard shortcuts

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