Documentation ¶
Index ¶
- func GetLogger(l logr.Logger) (log.Logger, bool)
- func New(l log.Logger) logr.Logger
- type LogSink
- func (s LogSink) Enabled(level int) bool
- func (s LogSink) Error(err error, msg string, keysAndValues ...any)
- func (s LogSink) Info(level int, msg string, keysAndValues ...any)
- func (s *LogSink) Init(info logr.RuntimeInfo)
- func (s LogSink) WithName(name string) logr.LogSink
- func (s LogSink) WithValues(keysAndValues ...any) logr.LogSink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogSink ¶
LogSink implements logr.LogSink, backed by a sourcegraph/log.Logger.
func (LogSink) Enabled ¶
Enabled tests whether this LogSink is enabled at the specified V-level. For example, commandline flags might be used to set the logging verbosity and disable some info logs.
func (LogSink) Error ¶
Error logs an error, with the given message and key/value pairs as context. See Logger.Error for more details.
func (LogSink) Info ¶
Info logs a non-error message with the given key/value pairs as context. The level argument is provided for optional logging. This method will only be called when Enabled(level) is true. See Logger.Info for more details.
func (*LogSink) Init ¶
func (s *LogSink) Init(info logr.RuntimeInfo)
Init receives optional information about the logr library for LogSink implementations that need it.