log

package
v1.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: Apache-2.0 Imports: 9 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// RolloutKey defines the key for the rollout field
	RolloutKey = "rollout"
	// ExperimentKey defines the key for the experiment field
	ExperimentKey = "experiment"
	// AnalysisRunKey defines the key for the analysisrun field
	AnalysisRunKey = "analysisrun"
	// ServiceKey defines the key for the service field
	ServiceKey = "service"
	// IngressKey defines the key for the ingress field
	IngressKey = "ingress"
	// NamespaceKey defines the key for the namespace field
	NamespaceKey = "namespace"
)

Variables

This section is empty.

Functions

func KindNamespaceName added in v1.0.0

func KindNamespaceName(logCtx *log.Entry) (string, string, string)

KindNamespaceName is a helper to get kind, namespace, name from a logging context This is an optimization that callers can use to avoid inferring this again from a runtime.Object

func SetKLogLevel added in v1.0.0

func SetKLogLevel(klogLevel int)

SetKLogLevel set the klog level for the k8s go-client

func WithAnalysisRun added in v0.6.0

func WithAnalysisRun(ar *v1alpha1.AnalysisRun) *log.Entry

WithAnalysisRun returns a logging context for AnalysisRun

func WithExperiment added in v0.5.0

func WithExperiment(experiment *v1alpha1.Experiment) *log.Entry

WithExperiment returns a logging context for Experiments

func WithObject added in v1.0.0

func WithObject(obj runtime.Object) *log.Entry

WithObject returns a logging context for an object which includes <kind>=<name> and namespace=<namespace>

func WithRedactor added in v0.8.0

func WithRedactor(entry log.Entry, secrets []string) *log.Entry

WithRedactor returns a log entry with the inputted secret values redacted

func WithRollout

func WithRollout(rollout *v1alpha1.Rollout) *log.Entry

WithRollout returns a logging context for Rollouts

func WithVersionFields added in v1.0.0

func WithVersionFields(entry *log.Entry, r *v1alpha1.Rollout) *log.Entry

Types

type RedactorFormatter added in v0.8.0

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

func (*RedactorFormatter) Format added in v0.8.0

func (f *RedactorFormatter) Format(e *log.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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