Documentation ¶
Overview ¶
Package logger config a zap logger, functions have same signature with `zap.logger`. Can be configured by env `LOG_LEVEL`.
Index ¶
- Variables
- func Copy() *zap.Logger
- func Ctx(ctx context.Context) zap.Field
- func DPanic(msg string, fields ...zapcore.Field)
- func Debug(msg string, fields ...zapcore.Field)
- func Err(err error, msg string, fields ...zapcore.Field)
- func Error(msg string, fields ...zapcore.Field)
- func Fatal(msg string, fields ...zapcore.Field)
- func Info(msg string, fields ...zapcore.Field)
- func Infoln(args ...any)
- func Named(name string) *zap.Logger
- func Panic(msg string, fields ...zapcore.Field)
- func Std() *stdLog.Logger
- func StdAt(level zapcore.Level) *stdLog.Logger
- func Warn(msg string, fields ...zapcore.Field)
- type RequestTrace
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestKey = &struct{}{}
Functions ¶
Types ¶
type RequestTrace ¶ added in v0.29.13
func (*RequestTrace) MarshalLogObject ¶ added in v0.29.13
func (r *RequestTrace) MarshalLogObject(enc zapcore.ObjectEncoder) error
Click to show internal directories.
Click to hide internal directories.