Documentation ¶
Overview ¶
Package logrimp defines some common logr implementation
Index ¶
- func NewHclogLogger(logger hclog.Logger) logr.Logger
- func NewLogrusLogger(logger logrus.FieldLogger, opts ...logrusr.Option) logr.Logger
- func NewNoopLogger() logr.Logger
- func NewQuietLogger(logger logr.Logger) logr.Logger
- func NewSlogLogger(logger *slog.Logger) logr.Logger
- func NewStdOutLogr() logr.Logger
- func NewZapLogger(logger *zap.Logger) logr.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHclogLogger ¶
NewHclogLogger returns a new HCLog logger.
func NewLogrusLogger ¶
func NewLogrusLogger(logger logrus.FieldLogger, opts ...logrusr.Option) logr.Logger
NewLogrusLogger returns a logrus logger.
func NewQuietLogger ¶ added in v1.56.0
NewQuietLogger returns a quiet logger which only logs errors.
func NewSlogLogger ¶ added in v1.45.0
NewSlogLogger returns a new [slog logger](see https://pkg.go.dev/golang.org/x/exp/slog) which will be part of the standard library.
func NewStdOutLogr ¶
NewStdOutLogr returns a logger to standard out. See https://github.com/go-logr/logr/blob/ff91da8dc418a9e36998931ed4ab10b71833a368/example_test.go#L27
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.