logrimp

package
v1.69.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package logrimp defines some common logr implementation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHclogLogger

func NewHclogLogger(logger hclog.Logger) logr.Logger

NewHclogLogger returns a new HCLog logger.

func NewLogrusLogger

func NewLogrusLogger(logger logrus.FieldLogger, opts ...logrusr.Option) logr.Logger

NewLogrusLogger returns a logrus logger.

func NewNoopLogger

func NewNoopLogger() logr.Logger

NewNoopLogger returns a discarding.

func NewQuietLogger added in v1.56.0

func NewQuietLogger(logger logr.Logger) logr.Logger

NewQuietLogger returns a quiet logger which only logs errors.

func NewSlogLogger added in v1.45.0

func NewSlogLogger(logger *slog.Logger) logr.Logger

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

func NewStdOutLogr() logr.Logger

NewStdOutLogr returns a logger to standard out. See https://github.com/go-logr/logr/blob/ff91da8dc418a9e36998931ed4ab10b71833a368/example_test.go#L27

func NewZapLogger

func NewZapLogger(logger *zap.Logger) logr.Logger

NewZapLogger returns a new zap logger

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL