Documentation
¶
Index ¶
- func NewLogger(logger logr.Logger) logr.Logger
- func UnwrapValues(err error) (res []any)
- func Wrap(err error, keysAndValues ...any) error
- type Error
- type Logger
- func (l *Logger) Enabled(level int) bool
- func (l *Logger) Error(err error, msg string, keysAndValues ...interface{})
- func (l *Logger) Info(level int, msg string, keysAndValues ...interface{})
- func (l *Logger) Init(ri logr.RuntimeInfo)
- func (l *Logger) WithName(name string) logr.LogSink
- func (l *Logger) WithValues(keysAndValues ...interface{}) logr.LogSink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnwrapValues ¶
UnwrapValues returns a combined set of keys and values from every wrapped error
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is a structured error that stores structured errors and values alongside the error
func (*Error) WithValues ¶
WithValues injects additional structured keys and values into the error
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a structured error logger that can be used as a wrapper for other logr.Loggers It unwraps the values for structured errors and calls WithValues() for them
func (*Logger) Init ¶
func (l *Logger) Init(ri logr.RuntimeInfo)
func (*Logger) WithValues ¶
Click to show internal directories.
Click to hide internal directories.