logging

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoLevel  = "info"
	DebugLevel = "debug"
	ErrorLevel = "error"
)

Logger constants

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) *zap.SugaredLogger

FromContext returns the logger in the context.

func NewLogger

func NewLogger() *zap.SugaredLogger

NewLogger returns a new zap.SugaredLogger

func WithAgentLabels

func WithAgentLabels(logger *zap.SugaredLogger) *zap.SugaredLogger

WithAgentLabels binds NAMESPACE, AGENTSET_NAME, and AGENTDEPLOY_NAME from the pod environment as persistent log fields.

func WithLogger

func WithLogger(ctx context.Context, logger *zap.SugaredLogger) context.Context

WithLogger returns a copy of parent context in which the value associated with logger key is the supplied logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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