Documentation
¶
Overview ¶
Package log is a thin wrapper based on "go.uber.org/zap".
Index ¶
- Constants
- Variables
- func Debugf(template string, args ...any)
- func Errorf(template string, args ...any)
- func Fatalf(template string, args ...any)
- func Infof(template string, args ...any)
- func SetLogger(logger *Logger)
- func Warnf(template string, args ...any)
- type Level
- type Logger
- type Option
- type SugaredLogger
Constants ¶
View Source
const ( DebugLevel = zapcore.DebugLevel InfoLevel = zapcore.InfoLevel WarnLevel = zapcore.WarnLevel ErrorLevel = zapcore.ErrorLevel DPanicLevel = zapcore.DPanicLevel PanicLevel = zapcore.PanicLevel FatalLevel = zapcore.FatalLevel InvalidLevel = zapcore.InvalidLevel SilentLevel = InvalidLevel + 1 )
Levels are aliases for Level.
Variables ¶
View Source
var Must = zap.Must
Must is an alias for zap.Must.
Functions ¶
Types ¶
type Level ¶
Level is an alias for zapcore.Level.
func ParseLevel ¶
ParseLevel is a thin wrapper for zapcore.ParseLevel.
type SugaredLogger ¶
type SugaredLogger = zap.SugaredLogger
logger aliases for zap.Logger and zap.SugaredLogger.
Click to show internal directories.
Click to hide internal directories.