zaplog

package
v0.0.0-...-e5dec72 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LevelDebug config log level sentinel
	LevelDebug = "debug"
	LevelInfo  = "info"
	LevelWarn  = "warn"
	LevelError = "error"
	LevelFatal = "fatal"
)

Variables

This section is empty.

Functions

func NewZapLogger

func NewZapLogger(cfg *config.ZapConfig) (logger *zap.Logger, err error)

NewZapLogger 日志配置文件 如果需要配置 options, 请使用 logger.WithOptions() 方法进行配置 zap.AddCaller() zap.AddCallerSkip(2) 添加额外的配置

Types

This section is empty.

Jump to

Keyboard shortcuts

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