logging

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 48

Documentation

Overview

Package logging supplies common constants to ensure consistent use of structured logs.

Index

Constants

View Source
const (
	// ReconcilerKey is used to identify a reconciler.
	ReconcilerKey = "reconciler"

	// QueueKeyKey is used to expose the workqueue key being processed.
	QueueKeyKey = "key"

	// WorkspaceKey is used to specify a workspace when a log is related to an object.
	WorkspaceKey = "workspace"
	// NamespaceKey is used to specify a namespace when a log is related to an object.
	NamespaceKey = "namespace"
	// NameKey is used to specify a name when a log is related to an object.
	NameKey = "name"
)

Variables

This section is empty.

Functions

func From

func From(obj metav1.Object) []interface{}

From provides the structured logging fields that identify an object.

func WithObject

func WithObject(logger logr.Logger, obj metav1.Object) logr.Logger

WithObject adds object identifiers to the logger.

func WithQueueKey

func WithQueueKey(logger logr.Logger, key string) logr.Logger

WithQueueKey adds the queue key to the logger.

func WithReconciler

func WithReconciler(logger logr.Logger, reconciler string) logr.Logger

WithReconciler adds the reconciler name to the logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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