log

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(w io.Writer, opts ...option) logr.Logger

New returns a new logger based on the logr interface and the zap logging library.

func Sync

func Sync(logger logr.Logger)

Sync flushes buffered logs.

func Underlying

func Underlying(logger logr.Logger) (*zap.Logger, bool)

Underlying returns the zap logger used as a logr sink.

func WithDebug

func WithDebug(enabled bool) option

WithDebug configures the logger for development environments.

func WithLevel

func WithLevel(level int) option

WithLevel defines the verbosity of the logger (0 is the least verbose).

func WithName

func WithName(name string) option

WithName defines the name of the logger.

func WithVerbosity

func WithVerbosity() option

WithVerbosity defines the V-level to 1.

Types

This section is empty.

Jump to

Keyboard shortcuts

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