Versions in this module Expand all Collapse all v1 v1.0.2 Nov 25, 2025 v1.0.1 Nov 25, 2025 v1.0.0 Sep 18, 2025 Changes in this version + func InitFlags(flagset *flag.FlagSet) + func NewContext(ctx context.Context, log Logger) context.Context + func NewContextWithDiscard(ctx context.Context) context.Context + func PreventKeyConflicts(log logr.Logger) logr.Logger + func SetLogger(log Logger) + type Config struct + Cli bool + Development bool + DisableCaller bool + DisableStacktrace bool + DisableTimestamp bool + Format logFormatValue + Level logLevelValue + func (c *Config) SetDisableCaller(zapCfg *zap.Config) + func (c *Config) SetDisableStacktrace(zapCfg *zap.Config) + func (c *Config) SetLogFormat(zapCfg *zap.Config) + func (c *Config) SetLogLevel(zapCfg *zap.Config) + func (c *Config) SetTimestamp(zapCfg *zap.Config) + func (c *Config) WithLogFormat(f LogFormat) *Config + func (c *Config) WithLogLevel(l LogLevel) *Config + type KeyConflictPreventionLayer struct + func (kcpl KeyConflictPreventionLayer) Enabled(level int) bool + func (kcpl KeyConflictPreventionLayer) Error(err error, msg string, keysAndValues ...interface{}) + func (kcpl KeyConflictPreventionLayer) Info(level int, msg string, keysAndValues ...interface{}) + func (kcpl KeyConflictPreventionLayer) Init(info logr.RuntimeInfo) + func (kcpl KeyConflictPreventionLayer) WithName(name string) logr.LogSink + func (kcpl KeyConflictPreventionLayer) WithValues(keysAndValues ...interface{}) logr.LogSink + type LogFormat int + const JSON + const TEXT + func ParseLogFormat(raw string) (LogFormat, error) + func (f LogFormat) String() string + type LogLevel int + const DEBUG + const ERROR + const INFO + func ParseLogLevel(raw string) (LogLevel, error) + func (l LogLevel) String() string + type Logger struct + var Log Logger + func Discard() Logger + func FromContext(ctx context.Context) (Logger, error) + func FromContextOrDiscard(ctx context.Context) Logger + func FromContextOrNew(ctx context.Context, keysAndValuesFallback []interface{}, ...) (Logger, context.Context) + func FromContextOrPanic(ctx context.Context) Logger + func FromContextWithFallback(ctx context.Context, fallback Logger, keysAndValues ...interface{}) (Logger, context.Context) + func GetLogger() (Logger, error) + func MustStartReconcileFromContext(ctx context.Context, req reconcile.Request, ...) (Logger, context.Context) + func New(config *Config) (Logger, error) + func NewCliLogger() (Logger, error) + func StartReconcileFromContext(ctx context.Context, req reconcile.Request) (Logger, context.Context, error) + func Wrap(log logr.Logger) Logger + func (l Logger) Debug(msg string, keysAndValues ...interface{}) + func (l Logger) Enabled(lvl LogLevel) bool + func (l Logger) Error(err error, msg string, keysAndValues ...interface{}) + func (l Logger) Info(msg string, keysAndValues ...interface{}) + func (l Logger) IsInitialized() bool + func (l Logger) Log(lvl LogLevel, msg string, keysAndValues ...interface{}) + func (l Logger) Logr() logr.Logger + func (l Logger) Reconciles(name, reconciledResource string) Logger + func (l Logger) StartReconcile(req reconcile.Request, keysAndValues ...interface{}) Logger + func (l Logger) StartReconcileAndAddToContext(ctx context.Context, req reconcile.Request, keysAndValues ...interface{}) (Logger, context.Context) + func (l Logger) WithName(name string) Logger + func (l Logger) WithNameAndContext(ctx context.Context, name string) (Logger, context.Context) + func (l Logger) WithValues(keysAndValues ...interface{}) Logger + func (l Logger) WithValuesAndContext(ctx context.Context, keysAndValues ...interface{}) (Logger, context.Context)