Documentation ¶
Index ¶
- Variables
- func ConfigureGlobalLoggers(ctx context.Context)
- func DefaultZapConfig(ctx context.Context, component string) zap.Config
- func IgnoreDebugEvents(logger logr.Logger) logr.Logger
- func NewLogger(ctx context.Context, component string) *zap.SugaredLogger
- func WithCommit(logger *zap.SugaredLogger) *zap.SugaredLogger
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 ¶
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 IgnoreDebugEvents ¶
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.
Click to show internal directories.
Click to hide internal directories.