Documentation
¶
Overview ¶
Package handler holds the internal slog.Handler chain that backs the telemetry logger: trace correlation, redaction, and the zerolog writer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedact ¶
NewRedact wraps next so every attribute is redacted before reaching it.
Types ¶
type ZerologHandler ¶
type ZerologHandler struct {
// contains filtered or unexported fields
}
ZerologHandler is a terminal slog.Handler that writes records via zerolog.
func NewZerolog ¶
NewZerolog builds a terminal handler. When console is true it renders human-friendly output, otherwise structured JSON.
func (*ZerologHandler) Enabled ¶
func (*ZerologHandler) Handle ¶
func (*ZerologHandler) WithAttrs ¶
func (h *ZerologHandler) WithAttrs(attrs []slog.Attr) slog.Handler
func (*ZerologHandler) WithGroup ¶
func (h *ZerologHandler) WithGroup(name string) slog.Handler
Source Files
¶
- redact.go
- trace.go
- zerolog.go
Click to show internal directories.
Click to hide internal directories.