logger

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder string

Encoder is an enum for the log encoders.

const (

	// EncoderConsole is the console encoder.
	EncoderConsole Encoder = "console"

	// EncoderJSON is the json encoder.
	EncoderJSON Encoder = "json"
)

type Logger

type Logger struct {
	Encoder string
}

Logger is a wrapper for the log encoder.

func New

func New() *Logger

New returns a new logger with console encoder as the default.

func (*Logger) AddFlags

func (l *Logger) AddFlags()

AddFlags adds flags for the logger.

func (*Logger) Get

func (l *Logger) Get() logr.Logger

Get returns a new logr.Logger according to the encoder.

Jump to

Keyboard shortcuts

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