logging

package
v0.1.2-audi.spark.inte... Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextLogger

type ContextLogger interface {
	logr.Logger

	NewContext(ctx context.Context, keysAndValues ...interface{}) (context.Context, logr.Logger)
	FromContext(context.Context) logr.Logger
}

ContextLogger extends logr.Logger with the ability to store and retrieve custom loggers using contexts. This interface is intended for use with request-scoped operations.

func New

func New(log logr.Logger) ContextLogger

New returns a ContextLogger with an embedded logr.Logger instance. It can be used just like a regular logger when its extra context-based capabilities are not required.

Jump to

Keyboard shortcuts

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