Documentation ¶
Overview ¶
Package logger creates a logger for operators
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Trace bool
Trace is set to true if 'trace' level logging was configured. Since Zap doesn't have a trace level, this uses the debug level to fake it.
Functions ¶
func New ¶
func New(level string, options ...zap.Option) *zap.SugaredLogger
New creates a new logger with our setup
func NewControllerLogger ¶
func NewControllerLogger(level string) *zap.SugaredLogger
NewControllerLogger returns a new logger, which does not include the ctxlog wrapper in caller annotations and sets up controller-runtime to use it
func TraceFilter ¶
func TraceFilter(log *zap.SugaredLogger, name string) *zap.SugaredLogger
TraceFilter returns the debug logger if trace is enabled, otherwise a nop logger
func Unskip ¶
func Unskip(log *zap.SugaredLogger, name string) *zap.SugaredLogger
Unskip removes the CallerSkip for the wrapper, i.e. ctxlog
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.