Documentation ¶
Index ¶
Constants ¶
View Source
const LevelKey = "level"
LevelKey is logger level key.
Variables ¶
View Source
var ( // DefaultCaller is a Valuer that returns the file and line. DefaultCaller = Caller(3) )
Functions ¶
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter is a logger filter.
type Level ¶
type Level int8
Level is a logger level.
func ParseLevel ¶
ParseLevel parses a level string into a logger Level value.
type Logger ¶
type Logger interface { Debug(msg string, fields ...zap.Field) Info(msg string, fields ...zap.Field) Warn(msg string, fields ...zap.Field) Error(msg string, fields ...zap.Field) DPanic(msg string, fields ...zap.Field) Panic(msg string, fields ...zap.Field) Fatal(msg string, fields ...zap.Field) Debugc(ctx context.Context, msg string, fields ...zap.Field) Infoc(ctx context.Context, msg string, fields ...zap.Field) Warnc(ctx context.Context, msg string, fields ...zap.Field) Errorc(ctx context.Context, msg string, fields ...zap.Field) DPanicc(ctx context.Context, msg string, fields ...zap.Field) Panicc(ctx context.Context, msg string, fields ...zap.Field) Fatalc(ctx context.Context, msg string, fields ...zap.Field) }
Logger is a logger interface.
Click to show internal directories.
Click to hide internal directories.