Documentation
¶
Index ¶
- func Debug(msg string, args ...any)
- func DebugContext(ctx context.Context, msg string, args ...any)
- func DebugContextf(ctx context.Context, format string, args ...any)
- func Debugf(format string, args ...any)
- func Error(msg string, args ...any)
- func ErrorContext(ctx context.Context, msg string, args ...any)
- func ErrorContextf(ctx context.Context, format string, args ...any)
- func Errorf(format string, args ...any)
- func Fatal(msg string, args ...any)
- func FatalContext(ctx context.Context, msg string, args ...any)
- func FatalContextf(ctx context.Context, format string, args ...any)
- func Fatalf(format string, args ...any)
- func Info(msg string, args ...any)
- func InfoContext(ctx context.Context, msg string, args ...any)
- func InfoContextf(ctx context.Context, format string, args ...any)
- func Infof(format string, args ...any)
- func Warn(msg string, args ...any)
- func WarnContext(ctx context.Context, msg string, args ...any)
- func WarnContextf(ctx context.Context, format string, args ...any)
- func Warnf(format string, args ...any)
- func WithLogger(ctx context.Context, logger *Logger) context.Context
- func WithValues(ctx context.Context, args ...any) context.Context
- type Handler
- type Logger
- func DefaultLogger() *Logger
- func FromContext(ctx context.Context) *Logger
- func New(h slog.Handler) *Logger
- func NewLogger(l *slog.Logger) *Logger
- func NewLoggerWithContext(ctx context.Context, l *slog.Logger) *Logger
- func NewWithContext(ctx context.Context, h slog.Handler) *Logger
- func With(args ...any) *Logger
- func (l *Logger) Base() *slog.Logger
- func (l *Logger) Debug(msg string, args ...any)
- func (l *Logger) DebugContextf(ctx context.Context, format string, args ...any)
- func (l *Logger) Debugf(format string, args ...any)
- func (l *Logger) Error(msg string, args ...any)
- func (l *Logger) ErrorContextf(ctx context.Context, format string, args ...any)
- func (l *Logger) Errorf(format string, args ...any)
- func (l *Logger) Fatal(msg string, args ...any)
- func (l *Logger) FatalContext(ctx context.Context, msg string, args ...any)
- func (l *Logger) FatalContextf(ctx context.Context, format string, args ...any)
- func (l *Logger) Fatalf(format string, args ...any)
- func (l *Logger) Handler() slog.Handler
- func (l *Logger) Info(msg string, args ...any)
- func (l *Logger) InfoContextf(ctx context.Context, format string, args ...any)
- func (l *Logger) Infof(format string, args ...any)
- func (l *Logger) Warn(msg string, args ...any)
- func (l *Logger) WarnContextf(ctx context.Context, format string, args ...any)
- func (l *Logger) Warnf(format string, args ...any)
- func (l *Logger) With(args ...any) *Logger
- func (l *Logger) WithGroup(name string) *Logger
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugContext ¶
DebugContext calls DebugContext on the context logger.
func DebugContextf ¶
DebugContextf calls DebugContextf on the context logger. If a Logger is found in the context, it will be used.
func ErrorContext ¶
ErrorContext calls ErrorContext on the context logger.
func ErrorContextf ¶
ErrorContextf calls ErrorContextf on the context logger.