Documentation
¶
Overview ¶
Package logger provides logging utilities for the binder project. Trace-level functions are compiled as no-ops by default for zero overhead on hot paths. Build with -tags=debug_trace to enable them.
Index ¶
- Constants
- func CtxWithLogger(ctx context.Context, l logger.Logger) context.Context
- func DebugFields(ctx context.Context, message string, fields field.AbstractFields)
- func Debugf(ctx context.Context, format string, args ...any)
- func ErrorFields(ctx context.Context, message string, fields field.AbstractFields)
- func Errorf(ctx context.Context, format string, args ...any)
- func FromCtx(ctx context.Context) logger.Logger
- func InfoFields(ctx context.Context, message string, fields field.AbstractFields)
- func Infof(ctx context.Context, format string, args ...any)
- func Logf(ctx context.Context, level logger.Level, format string, args ...any)
- func Trace(_ context.Context, _ ...any)
- func TraceFields(_ context.Context, _ string, _ field.AbstractFields)
- func Tracef(_ context.Context, _ string, _ ...any)
- func WarnFields(ctx context.Context, message string, fields field.AbstractFields)
- func Warnf(ctx context.Context, format string, args ...any)
- type Level
- type Logger
Constants ¶
View Source
const ( LevelUndefined = logger.LevelUndefined LevelFatal = logger.LevelFatal LevelPanic = logger.LevelPanic LevelError = logger.LevelError LevelWarning = logger.LevelWarning LevelInfo = logger.LevelInfo LevelDebug = logger.LevelDebug LevelTrace = logger.LevelTrace )
Variables ¶
This section is empty.
Functions ¶
func DebugFields ¶
func DebugFields(ctx context.Context, message string, fields field.AbstractFields)
func ErrorFields ¶
func ErrorFields(ctx context.Context, message string, fields field.AbstractFields)
func InfoFields ¶
func InfoFields(ctx context.Context, message string, fields field.AbstractFields)
func TraceFields ¶
func TraceFields(_ context.Context, _ string, _ field.AbstractFields)
TraceFields is a no-op when debug_trace build tag is not set.
func WarnFields ¶
func WarnFields(ctx context.Context, message string, fields field.AbstractFields)
Types ¶
Click to show internal directories.
Click to hide internal directories.