log

package
v0.0.0-...-9c21ab8 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LenStackBuf = 4096
)

Variables

This section is empty.

Functions

func CloseLogger

func CloseLogger()

关闭服务器之前调用,同步缓冲区

func Debug

func Debug(format string, a ...interface{})

调试模式下打印caller,其他忽略,减少开销

func EnableDebug

func EnableDebug(option bool)

激活debug等级

func Error

func Error(format string, a ...interface{})

func Fatal

func Fatal(format string, a ...interface{})

func GetLogPath

func GetLogPath() string

func GetOriginLogger

func GetOriginLogger() *zap.SugaredLogger

func Info

func Info(format string, a ...interface{})

func InitLogger

func InitLogger(path string)

path是一个文件夹路径,自动生成track.json, service.log, err.log 其他的输出到标准输出和标准错误

func IsInit

func IsInit() bool

func ToRawJson

func ToRawJson(obj interface{}) *json.RawMessage

辅助函数,Track中使用zap.Any打印Object之前将其转换为原始json

func Track

func Track(msg string, fields ...zap.Field)

输出json的track

func Warn

func Warn(format string, a ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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