Documentation
¶
Overview ¶
Package slogadapter bridges *slog.Logger callers (notably github.com/prometheus/exporter-toolkit) onto the package-level logrus logger used by the rest of junos_exporter. Records keep their original level and structured attributes instead of being collapsed into a pre-rendered text line.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements slog.Handler. The zero value is ready to use.
func (*Handler) Enabled ¶
Enabled lets logrus's current level filter slog records before any work (attr collection, string formatting) is done.
func (*Handler) Handle ¶
Handle forwards r to logrus at the corresponding level, with all attrs (those set via WithAttrs plus those on the record) as logrus fields.
Click to show internal directories.
Click to hide internal directories.