logger

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LevelEmergency     = iota //紧急的
	LevelAlert                //警报
	LevelCritical             //重要的
	LevelError                //错误
	LevelWarning              //警告
	LevelNotice               //提示
	LevelInformational        //信息
	LevelDebug                //调试
)

RFC5424 log message levels.

View Source
const (
	LevelTrace = LevelDebug
	LevelWarn  = LevelWarning
	LevelInfo  = LevelInformational
)
View Source
const (
	AdapterConsole   = "console"
	AdapterFile      = "file"
	AdapterMultiFile = "multifile"
)
View Source
const (
	TextBlack = iota + 30
	TextRed
	TextGreen
	TextYellow
	TextBlue
	TextMagenta
	TextCyan
	TextWhite
)

Variables

This section is empty.

Functions

func Alert

func Alert(f interface{}, v ...interface{})

func Alert_CustomFuncCallDepth

func Alert_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func Async

func Async(msgChanLen int64)

func Black

func Black(msg string) string

func Blue

func Blue(msg string) string

func ConsoleAgainShow

func ConsoleAgainShow()

func ConsoleStopShow

func ConsoleStopShow()

func Critical

func Critical(f interface{}, v ...interface{})

func Critical_CustomFuncCallDepth

func Critical_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func Cyan

func Cyan(msg string) string

func Debug

func Debug(f interface{}, v ...interface{})

func Debug_CustomFuncCallDepth

func Debug_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func DeleteRequestId

func DeleteRequestId()

func Emergency

func Emergency(f interface{}, v ...interface{})

func Emergency_CustomFuncCallDepth

func Emergency_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

*****************************************************

func Error

func Error(f interface{}, v ...interface{})

func Error_CustomFuncCallDepth

func Error_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func FormatTimeHeader

func FormatTimeHeader(when time.Time) ([]byte, int)

func GetRequestId

func GetRequestId() interface{}

func Green

func Green(msg string) string

func Info

func Info(f interface{}, v ...interface{})

func Info_CustomFuncCallDepth

func Info_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func Informational

func Informational(f interface{}, v ...interface{})

func Informational_CustomFuncCallDepth

func Informational_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func InitWithDefaultConfig

func InitWithDefaultConfig()

func Magenta

func Magenta(msg string) string

func Notice

func Notice(f interface{}, v ...interface{})

func Notice_CustomFuncCallDepth

func Notice_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func Red

func Red(msg string) string

func RegAdapter

func RegAdapter(adapterName string)

func SetColor

func SetColor(msg string, conf, bg, text int) string

func SetLoggerLevel

func SetLoggerLevel(adapterName string, level int)

func SetRequestId

func SetRequestId(ID interface{})

func Trace

func Trace(f interface{}, v ...interface{})

func Trace_CustomFuncCallDepth

func Trace_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func UnRegAdapter

func UnRegAdapter(adapterName string)

func Warn

func Warn(f interface{}, v ...interface{})

func Warn_CustomFuncCallDepth

func Warn_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func Warning

func Warning(f interface{}, v ...interface{})

func Warning_CustomFuncCallDepth

func Warning_CustomFuncCallDepth(funcCallDepth int, f interface{}, v ...interface{})

func White

func White(msg string) string

func Yellow

func Yellow(msg string) string

Types

type Config

type Config struct {
	ConsoleShow    bool
	ConsoleLevel   int
	FileWrite      bool
	FileLevel      int
	MultiFileWrite bool
	MultiFileLevel int
}

Jump to

Keyboard shortcuts

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