Documentation ¶
Index ¶
- type Listener
- type LogEntry
- type Logger
- func (l *Logger) Enabled() bool
- func (l *Logger) Error(err error, msg string, kvs ...interface{})
- func (l *Logger) Info(msg string, kvs ...interface{})
- func (l *Logger) V(level int) logr.InfoLogger
- func (l *Logger) WithName(name string) logr.Logger
- func (l *Logger) WithValues(kvList ...interface{}) logr.Logger
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
func (*Listener) GetEntries ¶
type LogEntry ¶
type LogEntry struct { // Prefix of the log line, composed of the hierarchy of log.WithName values. Prefix string // LogFunc of the log entry, e.g. "Info", "Error" LogFunc string // Level of the LogEntry. Level int // Values of the log line, composed of the concatenation of log.WithValues and KeyValue pairs passed to log.Info. Values []interface{} }
LogEntry defines the information that can be used for composing a log line.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger defines a test friendly logr.Logger
func (*Logger) V ¶
func (l *Logger) V(level int) logr.InfoLogger
V returns an InfoLogger value for a specific verbosity level.
func (*Logger) WithValues ¶
WithValues adds some key-value pairs of context to a logger.
type Option ¶
type Option func(*Logger)
Option is a configuration option supplied to NewLogger
func WithThreshold ¶
WithThreshold implements a New Option that allows to set the threshold level for a new logger. The logger will write only log messages with a level/V(x) equal or higher to the threshold.
func WithWriter ¶
WithWriter configures the logger to write to the io.Writer
Click to show internal directories.
Click to hide internal directories.