logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CELLogger

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

CELLogger implements the observability.Logger interface for CEL evaluation logging.

func NewCELLogger

func NewCELLogger(baseLogger logr.Logger) *CELLogger

NewCELLogger creates a new CELLogger from a base logger.

func (*CELLogger) CacheHit

func (l *CELLogger) CacheHit(expression, expressionType string)

CacheHit logs a cache hit event.

func (*CELLogger) EvaluationError

func (l *CELLogger) EvaluationError(err error, expression, expressionType string, duration time.Duration)

EvaluationError logs a CEL evaluation error

func (*CELLogger) EvaluationStart

func (l *CELLogger) EvaluationStart(expression, expressionType string)

EvaluationStart logs the start of a CEL evaluation

func (*CELLogger) EvaluationSuccess

func (l *CELLogger) EvaluationSuccess(expression, expressionType string, duration time.Duration, result any)

EvaluationSuccess logs a successful CEL evaluation

type CleanupLogger

type CleanupLogger struct {
	*ControllerLogger
}

CleanupLogger provides specialized logging for cleanup operations

func NewCleanupLogger

func NewCleanupLogger(ctx context.Context, resourceType string) *CleanupLogger

NewCleanupLogger creates a logger for cleanup operations

func (*CleanupLogger) CleanupError

func (cl *CleanupLogger) CleanupError(err error, resourceName string, keysAndValues ...any)

CleanupError logs cleanup error

func (*CleanupLogger) CleanupStart

func (cl *CleanupLogger) CleanupStart(resourceName string, keysAndValues ...any)

CleanupStart logs cleanup start

func (*CleanupLogger) CleanupSuccess

func (cl *CleanupLogger) CleanupSuccess(resourceName string, duration time.Duration, keysAndValues ...any)

CleanupSuccess logs cleanup success

type ControllerLogger

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

ControllerLogger provides structured logging for controllers

func NewControllerLogger

func NewControllerLogger(ctx context.Context, controller string) *ControllerLogger

NewControllerLogger creates a new structured logger

func (*ControllerLogger) Error

func (cl *ControllerLogger) Error(err error, msg string, keysAndValues ...any)

Error logs an error message

func (*ControllerLogger) Info

func (cl *ControllerLogger) Info(msg string, keysAndValues ...any)

Info logs an info message

func (*ControllerLogger) V

func (cl *ControllerLogger) V(level int) logr.Logger

V returns a logger for a specific verbosity level

func (*ControllerLogger) WithDuration

func (cl *ControllerLogger) WithDuration(duration time.Duration) *ControllerLogger

WithDuration adds duration to the logger context

func (*ControllerLogger) WithEngram

func (cl *ControllerLogger) WithEngram(engram *bubushv1alpha1.Engram) *ControllerLogger

WithEngram returns a logger with Engram context

func (*ControllerLogger) WithError

func (cl *ControllerLogger) WithError(err error) *ControllerLogger

WithError adds error to the logger context

func (*ControllerLogger) WithImpulse

func (cl *ControllerLogger) WithImpulse(impulse *bubushv1alpha1.Impulse) *ControllerLogger

WithImpulse returns a logger with Impulse context

func (*ControllerLogger) WithStepRun

func (cl *ControllerLogger) WithStepRun(steprun *runsv1alpha1.StepRun) *ControllerLogger

WithStepRun returns a logger with StepRun context

func (*ControllerLogger) WithStory

func (cl *ControllerLogger) WithStory(story *bubushv1alpha1.Story) *ControllerLogger

WithStory returns a logger with Story context

func (*ControllerLogger) WithStoryRun

func (cl *ControllerLogger) WithStoryRun(srun *runsv1alpha1.StoryRun) *ControllerLogger

WithStoryRun returns a logger with StoryRun context

func (*ControllerLogger) WithValues

func (cl *ControllerLogger) WithValues(keysAndValues ...any) *ControllerLogger

WithValues adds custom key-value pairs to the logger

type LoggerKey

type LoggerKey struct{}

LoggerKey is used for storing logger in context

type ReconcileLogger

type ReconcileLogger struct {
	*ControllerLogger
	// contains filtered or unexported fields
}

ReconcileLogger provides specialized logging for reconcile operations

func NewReconcileLogger

func NewReconcileLogger(ctx context.Context, controller string) *ReconcileLogger

NewReconcileLogger creates a logger for reconcile operations

func (*ReconcileLogger) ReconcileError

func (rl *ReconcileLogger) ReconcileError(err error, msg string, keysAndValues ...any)

ReconcileError logs reconciliation error

func (*ReconcileLogger) ReconcileRequeue

func (rl *ReconcileLogger) ReconcileRequeue(msg string, after time.Duration, keysAndValues ...any)

ReconcileRequeue logs reconciliation requeue

func (*ReconcileLogger) ReconcileStart

func (rl *ReconcileLogger) ReconcileStart(msg string, keysAndValues ...any)

ReconcileStart logs the start of reconciliation

func (*ReconcileLogger) ReconcileSuccess

func (rl *ReconcileLogger) ReconcileSuccess(msg string, keysAndValues ...any)

ReconcileSuccess logs successful reconciliation

type StepLogger

type StepLogger struct {
	*ControllerLogger
}

StepLogger provides specialized logging for step operations

func NewStepLogger

func NewStepLogger(ctx context.Context, steprun *runsv1alpha1.StepRun) *StepLogger

NewStepLogger creates a logger for step operations

func (*StepLogger) StepError

func (sl *StepLogger) StepError(err error, msg string, keysAndValues ...any)

StepError logs step execution error

func (*StepLogger) StepProgress

func (sl *StepLogger) StepProgress(msg string, keysAndValues ...any)

StepProgress logs step execution progress

func (*StepLogger) StepRetry

func (sl *StepLogger) StepRetry(attempt int, reason string, keysAndValues ...any)

StepRetry logs step retry

func (*StepLogger) StepStart

func (sl *StepLogger) StepStart(msg string, keysAndValues ...any)

StepStart logs step execution start

func (*StepLogger) StepSuccess

func (sl *StepLogger) StepSuccess(msg string, duration time.Duration, keysAndValues ...any)

StepSuccess logs step execution success

Jump to

Keyboard shortcuts

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