Documentation ¶
Overview ¶
Package slogr enables usage of a slog.Handler with logr.Logger as front-end API and of a logr.LogSink through the slog.Handler and thus slog.Logger APIs.
See the README in the top-level [./logr] package for a discussion of interoperability.
Deprecated: use the main logr package instead.
Index ¶
- func NewLogr(handler slog.Handler) logr.Loggerdeprecated
- func NewSlogHandler(logger logr.Logger) slog.Handlerdeprecated
- func ToSlogHandler(logger logr.Logger) slog.Handlerdeprecated
- type SlogSinkdeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSlogHandler
deprecated
NewSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger.
Deprecated: use logr.ToSlogHandler instead.
func ToSlogHandler
deprecated
added in
v1.4.0
ToSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger.
Deprecated: use logr.ToSlogHandler instead.
Types ¶
type SlogSink
deprecated
SlogSink is an optional interface that a LogSink can implement to support logging through the slog.Logger or slog.Handler APIs better.
Deprecated: use logr.SlogSink instead.