Documentation ¶
Index ¶
- func CustomZapFlagSet() *flag.FlagSet
- func Debug(ctx context.Context, msg string, v ...interface{})
- func Error(ctx context.Context, err error, msg string, v ...interface{})
- func ExtractLogger(ctx context.Context) logr.Logger
- func Info(ctx context.Context, msg string, v ...interface{})
- func NewContext(ctx context.Context, name string) context.Context
- func NewLogger(name string) logr.Logger
- func NewLoggerTo(destWriter io.Writer, name string) logr.Logger
- func NewParentContext(log logr.Logger) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomZapFlagSet ¶ added in v0.4.0
CustomZapFlagSet creates a flag.FlagSet containing the zap logger default flags to configure the zap options and it includes a custom flag `--zap-level` for backwards compatibility reasons
func ExtractLogger ¶
ExtractLogger returns a logger based on the loggerKey This function retrieves from an existing context the value, which in this case is an instance of our logger
func NewContext ¶
NewContext returns a new child context based on our logger key(loggerKey). This function is useful for spawning children context with a particular logging name for each controller
func NewLogger ¶
NewLogger returns a new Logger instance by using the controller-runtime log/zap logging implementation
func NewLoggerTo ¶ added in v0.3.0
NewLoggerTo returns a new Logger which logs to a given destination.
Types ¶
This section is empty.