Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SourceOverride ¶
SourceOverride returns a slog.Attr with the source of the caller at the given offset. SourceOverride(0) is the caller of SourceOverride, SourceOverride(1) is the caller of the caller, etc.
Types ¶
type SourceRewriter ¶
SourceRewriter is a slog.Handler that rewrites the source of log entries.
func NewSourceRewriter ¶
func NewSourceRewriter(h slog.Handler) SourceRewriter
NewSourceRewriter returns a new SourceRewriter that wraps the given handler. The returned SourceRewriter applies the SourceOverride commands.
Click to show internal directories.
Click to hide internal directories.