log

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From(ctx context.Context) logr.Logger

From extracts a logger from a context. If one does not exist, a new zap dev logger is created. This will panic if unable to create the zap dev logger.

func WithLogger

func WithLogger(ctx context.Context, logger logr.Logger) context.Context

WithLogger creates a context with an existing logger.

func ZapDevLogger

func ZapDevLogger() (logr.Logger, error)

ZapDevLogger creates a zap dev logger.

Types

type LoggerConfig

type LoggerConfig struct {
	// contains filtered or unexported fields
}

LoggerConfig is logger configuration.NewLogger

type LoggerOption

type LoggerOption func(config *LoggerConfig)

LoggerOption is an option for configuring the logger.

func LoggerOutput

func LoggerOutput(w io.Writer) LoggerOption

LoggerOutput sets the output location for the logger.

Jump to

Keyboard shortcuts

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