logger

package
v1.0.51 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

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

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 Debugf added in v1.0.51

func Debugf(format string, v ...interface{})

Debugf 调试

func Error

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

Error 错误

func Errorf added in v1.0.51

func Errorf(format string, v ...interface{})

Errorf 错误

func Fatal

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

Fatal 致命错误

func Fatalf added in v1.0.51

func Fatalf(format string, v ...interface{})

Fatalf 致命错误

func Info

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

Info 信息

func Infof added in v1.0.51

func Infof(format string, v ...interface{})

Infof 信息

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 Noticef added in v1.0.51

func Noticef(format string, v ...interface{})

Noticef 通知

func Panic

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

Panic 恐慌

func Panicf added in v1.0.51

func Panicf(format string, v ...interface{})

Panicf 恐慌

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 警告

func Warnf added in v1.0.51

func Warnf(format string, v ...interface{})

Warnf 警告

Types

This section is empty.

Jump to

Keyboard shortcuts

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