logger

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG int = iota
	INFO
	NOTICE
	WARN
	ERROR
	FATAL
	PANIC
)

Variables

View Source
var (
	Logger = New(log.New(os.Stderr, "", log.Lmsgprefix), "local", DEBUG, "asia/shanghai", datetime.LayoutDateTimeZoneT, nil)
)

Functions

func Debug

func Debug(message string, v ...interface{})

Debug 调试

func Error

func Error(message string, v ...interface{})

Error 错误

func Fatal

func Fatal(message string, v ...interface{})

Fatal 致命错误

func Info

func Info(message string, v ...interface{})

Info 信息

func New

func New(raw *log.Logger, env string, level int, timezone, timeFormat string, callback func(log map[string]interface{})) *logger

func Notice added in v1.0.4

func Notice(message string, v ...interface{})

Notice 通知

func Panic

func Panic(message string, v ...interface{})

Panic 恐慌

func SetLevel

func SetLevel(level int)

SetLevel 起始等级

func SetRequest added in v1.0.38

func SetRequest(request *http.Request)

SetRequest 请求

func SetTrace added in v1.0.38

func SetTrace(trace string)

SetTrace 追踪

func Warn

func Warn(message string, v ...interface{})

Warn 警告

Types

This section is empty.

Jump to

Keyboard shortcuts

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