Documentation ¶
Index ¶
- func AddHandle(ctx context.Context, handle Handle)
- func Debug(ctx context.Context, msg string, fields ...zap.Field)
- func Error(ctx context.Context, msg string, err error, fields ...zap.Field)
- func Fatal(ctx context.Context, msg string, err error, fields ...zap.Field)
- func Info(ctx context.Context, msg string, fields ...zap.Field)
- func Notice(ctx context.Context, msg string, fields ...zap.Field)
- func SetLogger(l Logger)
- func Trace(ctx context.Context, msg string, fields ...zap.Field)
- func Warning(ctx context.Context, msg string, err error, fields ...zap.Field)
- func WithField(key string, value interface{}) zap.Field
- type Handle
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Level ¶ added in v0.2.0
var ( LevelFatal Level = &level{code: 0, name: "fatal"} LevelError Level = &level{code: 1, name: "error"} LevelWarn Level = &level{code: 2, name: "warn"} LevelInfo Level = &level{code: 3, name: "info"} LevelNotice Level = &level{code: 4, name: "notice"} LevelDebug Level = &level{code: 5, name: "debug"} LevelTrace Level = &level{code: 6, name: "trace"} )
func GetLevelByCode ¶ added in v0.2.0
func GetLevelByName ¶ added in v0.2.0
type Logger ¶
type Logger interface { Fatal(ctx context.Context, msg string, err error, fields ...zap.Field) Error(ctx context.Context, msg string, err error, fields ...zap.Field) Warning(ctx context.Context, msg string, err error, fields ...zap.Field) Info(ctx context.Context, msg string, fields ...zap.Field) Notice(ctx context.Context, msg string, fields ...zap.Field) Debug(ctx context.Context, msg string, fields ...zap.Field) Trace(ctx context.Context, msg string, fields ...zap.Field) SetLevel(Level) Handle(ctx context.Context, handle Handle) }
Click to show internal directories.
Click to hide internal directories.