Documentation
¶
Overview ¶
Package logging provides logging utilities.
Index ¶
- func Extract(ctx context.Context) *slog.Logger
- func Inject(ctx context.Context, logger *slog.Logger) context.Context
- func InjectLabels(ctx context.Context, labels ...any) (context.Context, *slog.Logger)
- func NewJSON(requestedLevel string, humanReadable bool) *slog.Logger
- func NewMiddleware(logger *slog.Logger) func(http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
Extract will extract a logger from the context. If no logger is found, a default logger with level info is returned.
func InjectLabels ¶
InjectLabels injects labels to the logger living in the context, it will return both the context and the logger.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.