logger

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 2 Imported by: 3 modules, 47 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

logger

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DiscardLogger = logr.Discard()

DiscardLogger is a logr.Logger that does nothing.

Functions

func SetLogger

func SetLogger(l Logger)

SetLogger sets a concrete logging implementation for all deferred Loggers.

func WithContext

func WithContext(ctx context.Context, log Logger) context.Context

WithContext takes a context and sets the logger as one of its keys. Use FromContext function to retrieve the logger.

Types

type Logger

type Logger = logr.Logger
var Log Logger = DiscardLogger

Log is the base logger used by kubebuilder. It delegates to another logr.Logger. You *must* call SetLogger to get any actual logging.

func FromContext

func FromContext(ctx context.Context) Logger

FromContext returns a logger with predefined values from a context.Context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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