Documentation
¶
Overview ¶
Package log provides access to log/slog structured logging with opinionated defaults and integration with flags.
Index ¶
- func Debug(msg string, args ...any)
- func DebugContext(ctx context.Context, msg string, args ...any)
- func Error(msg string, args ...any)
- func ErrorContext(ctx context.Context, msg string, args ...any)
- func Info(msg string, args ...any)
- func InfoContext(ctx context.Context, msg string, args ...any)
- func Log(ctx context.Context, level Level, msg string, args ...any)
- func LogAttrs(ctx context.Context, level Level, msg string, attrs ...slog.Attr)
- func Warn(msg string, args ...any)
- func WarnContext(ctx context.Context, msg string, args ...any)
- func With(args ...any) *slog.Logger
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugContext ¶
DebugContext logs a message with the given arguments at the Debug level, using the specified context
func ErrorContext ¶
ErrorContext logs a message with the given arguments at the Error level, using the specified context
func InfoContext ¶
InfoContext logs a message with the given arguments at the Info level, using the specified context
func WarnContext ¶
WarnContext logs a message with the given arguments at the Warn level, using the specified context
Types ¶
Click to show internal directories.
Click to hide internal directories.