Documentation ¶
Overview ¶
Package log contains the global logger for the vineyard operator.
Index ¶
- Variables
- func Error(err error, msg string, keysAndValues ...any)
- func Errorf(err error, format string, v ...any)
- func Fatal(err error, msg string, keysAndValues ...any)
- func Fatalf(err error, format string, v ...any)
- func Info(msg string, keysAndValues ...any)
- func Infof(format string, v ...any)
- func IntoContext(ctx context.Context, log Logger) context.Context
- func Output(msg string)
- func Outputf(msg string, keysAndValues ...any)
- func SetLogLevel(level int)
- func SetLogger(l Logger)
- type EscapeSeqJSONEncoder
- type Logger
- func (l Logger) Errorf(err error, format string, v ...any)
- func (l Logger) Fatal(err error, msg string, keysAndValues ...any)
- func (l Logger) Fatalf(err error, format string, v ...any)
- func (l Logger) Infof(format string, v ...any)
- func (l Logger) Output(msg string)
- func (l Logger) Outputf(format string, v ...any)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Log = Logger{logr.New(dlog).WithName("vineyard")}
)
Functions ¶
func IntoContext ¶
IntoContext takes a context and sets the logger as one of its values. Use FromContext function to retrieve the logger.
func SetLogLevel ¶
func SetLogLevel(level int)
Types ¶
type EscapeSeqJSONEncoder ¶
func (*EscapeSeqJSONEncoder) Clone ¶
func (enc *EscapeSeqJSONEncoder) Clone() zapcore.Encoder
func (*EscapeSeqJSONEncoder) EncodeEntry ¶
type Logger ¶
Extends the logr's logger with Fatal support
func FromContext ¶
FromContext returns a logger with predefined values from a context.Context.
func WithValues ¶
Click to show internal directories.
Click to hide internal directories.