Documentation
¶
Index ¶
- func Debug(msg string, args ...any)
- func DebugContext(ctx context.Context, msg string, args ...any)
- func Default() *slog.Logger
- 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 slog.Level, msg string, args ...any)
- func LogAttrs(ctx context.Context, level slog.Level, msg string, attrs ...slog.Attr)
- func SetDefault(logger *slog.Logger)
- func Warn(msg string, args ...any)
- func WarnContext(ctx context.Context, msg string, args ...any)
- func With(args ...any) *slog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugContext ¶
DebugContext logs at LevelDebug with context using the process-wide logger.
func ErrorContext ¶
ErrorContext logs at LevelError with context using the process-wide logger.
func InfoContext ¶
InfoContext logs at LevelInfo with context using the process-wide logger.
func Log ¶
Log logs at the given level using the process-wide logger. Signature is identical to slog.Log.
func LogAttrs ¶
LogAttrs logs at the given level with pre-built attributes using the process-wide logger. Signature is identical to slog.LogAttrs.
func SetDefault ¶
SetDefault sets the process-wide logger, analogous to slog.SetDefault.
func WarnContext ¶
WarnContext logs at LevelWarn with context using the process-wide logger.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.