Documentation
¶
Index ¶
- func AttrsFromMap(m map[string]any) []any
- type ContextExtractor
- type ContextExtractorFunction
- type ContextHandler
- func (contextHandler *ContextHandler) Enabled(ctx context.Context, level slog.Level) bool
- func (contextHandler *ContextHandler) Handle(ctx context.Context, record slog.Record) error
- func (contextHandler *ContextHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (contextHandler *ContextHandler) WithGroup(name string) slog.Handler
- type ErrorContextExtractor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttrsFromMap ¶
Types ¶
type ContextExtractor ¶
type ContextHandler ¶
type ContextHandler struct {
Next slog.Handler
Extractors []ContextExtractor
}
type ErrorContextExtractor ¶
type ErrorContextExtractor struct {
SkipCause bool
SkipInput bool
SkipStackTrace bool
SkipOutput bool
ContextExtractors []ContextExtractor
}
func (*ErrorContextExtractor) MakeErrorAttrs ¶
func (extractor *ErrorContextExtractor) MakeErrorAttrs(err error) []any
Directories
¶
| Path | Synopsis |
|---|---|
|
Package http_logger makes the logger an HTTP service logs through: JSON entries carrying what is known about the request being logged, which the service's own logging calls need say nothing about.
|
Package http_logger makes the logger an HTTP service logs through: JSON entries carrying what is known about the request being logged, which the service's own logging calls need say nothing about. |
Click to show internal directories.
Click to hide internal directories.