Documentation
¶
Index ¶
- func DebugDPanic(logger *zap.Logger, err error, msg string, fields ...zap.Field)
- func DebugDPanicCtx(ctx context.Context, err error, msg string, fields ...zap.Field)
- func DebugError(logger *zap.Logger, err error, msg string, fields ...zap.Field)
- func DebugErrorCtx(ctx context.Context, err error, msg string, fields ...zap.Field)
- func DebugFatal(logger *zap.Logger, err error, msg string, fields ...zap.Field)
- func DebugFatalCtx(ctx context.Context, err error, msg string, fields ...zap.Field)
- func DebugInfo(logger *zap.Logger, err error, msg string, fields ...zap.Field)
- func DebugInfoCtx(ctx context.Context, err error, msg string, fields ...zap.Field)
- func InfoDPanic(logger *zap.Logger, err error, msg string, fields ...zap.Field)
- func InfoDPanicCtx(ctx context.Context, err error, msg string, fields ...zap.Field)
- func InfoError(logger *zap.Logger, err error, msg string, fields ...zap.Field)
- func InfoErrorCtx(ctx context.Context, err error, msg string, fields ...zap.Field)
- func InfoFatal(logger *zap.Logger, err error, msg string, fields ...zap.Field)
- func InfoFatalCtx(ctx context.Context, err error, msg string, fields ...zap.Field)
- func InfoPanic(logger *zap.Logger, err error, msg string, fields ...zap.Field)
- func InfoPanicCtx(ctx context.Context, err error, msg string, fields ...zap.Field)
- func L(ctx context.Context) *zap.Logger
- func LNop(ctx context.Context) (res *zap.Logger)
- func S(ctx context.Context) *zap.SugaredLogger
- func SNop(ctx context.Context) *zap.SugaredLogger
- func SetDefaultLogger(logger *zap.Logger)
- func WithLogger(ctx context.Context, l *zap.Logger) context.Context
- func WithSugarLogger(ctx context.Context, l *zap.SugaredLogger) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugDPanic ¶ added in v0.0.4
func DebugDPanicCtx ¶ added in v0.0.4
func DebugError ¶ added in v0.0.4
func DebugErrorCtx ¶ added in v0.0.4
func DebugFatal ¶ added in v0.0.4
func DebugFatalCtx ¶ added in v0.0.4
func DebugInfoCtx ¶ added in v0.0.4
func InfoDPanic ¶ added in v0.0.4
func InfoDPanicCtx ¶ added in v0.0.4
func InfoErrorCtx ¶ added in v0.0.4
func InfoFatalCtx ¶ added in v0.0.4
func InfoPanicCtx ¶ added in v0.0.4
func S ¶
func S(ctx context.Context) *zap.SugaredLogger
Return associated logger. Default logger if no ctx logger yet. (default of default is nil)
func SNop ¶
func SNop(ctx context.Context) *zap.SugaredLogger
Return associated logger. Nop if no ctx logger yet.
func SetDefaultLogger ¶ added in v0.0.3
SetDefaultLogger set logger, which will return with L and S function if no logger in context. It is NOT thread safe and no syncronization with L and S
func WithLogger ¶ added in v0.0.2
Return copy of ctx with associated logger
func WithSugarLogger ¶ added in v0.0.2
Return copy of ctx with associated logger
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.