logging

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NopLogger = zap.NewNop().Sugar()

NopLogger is used to throw away logs when we don't actually want to log in certain portions of the code since logging would be too noisy

Functions

func ConfigureGlobalLoggers

func ConfigureGlobalLoggers(ctx context.Context)

ConfigureGlobalLoggers sets up any package-wide loggers like "log" or "klog" that are utilized by other packages to use the configured *zap.SugaredLogger from the context

func DefaultZapConfig

func DefaultZapConfig(ctx context.Context, component string) zap.Config

func IgnoreDebugEvents

func IgnoreDebugEvents(logger logr.Logger) logr.Logger

IgnoreDebugEvents wraps the logger with one that ignores any debug logs coming from a logger named "events". This prevents every event we write from creating a debug log which spams the log file during scale-ups due to recording pod scheduling decisions as events for visibility.

func NewLogger

func NewLogger(ctx context.Context, component string) *zap.SugaredLogger

NewLogger returns a configured *zap.SugaredLogger

func WithCommit

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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