Documentation ¶
Overview ¶
Package log defines the interfaces used for logging in virtual-kubelet. It uses a context.Context to store logger details. Additionally you can set the default logger to use by setting log.L. This is used when no logger is stored in the passed in context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fields ¶
type Fields map[string]interface{}
Fields allows setting multiple fields on a logger at one time.
type Logger ¶
type Logger interface { Debug(...interface{}) Debugf(string, ...interface{}) Info(...interface{}) Infof(string, ...interface{}) Warn(...interface{}) Warnf(string, ...interface{}) Error(...interface{}) Errorf(string, ...interface{}) Fatal(...interface{}) Fatalf(string, ...interface{}) WithField(string, interface{}) Logger WithFields(Fields) Logger WithError(error) Logger }
Logger is the interface used for logging in virtual-kubelet
virtual-kubelet will access the logger via context using `GetLogger` (or its alias, `G`) You can set the default logger to use by setting the `L` variable.
Directories ¶
Path | Synopsis |
---|---|
Package klogv2 implements a virtual-kubelet/log.Logger using klogv2 as a backend
|
Package klogv2 implements a virtual-kubelet/log.Logger using klogv2 as a backend |
Package logrus implements a github.com/virtual-kubelet/virtual-kubelet/log.Logger using Logrus as a backend You can use this by creating a logrus logger and calling `FromLogrus(entry)`.
|
Package logrus implements a github.com/virtual-kubelet/virtual-kubelet/log.Logger using Logrus as a backend You can use this by creating a logrus logger and calling `FromLogrus(entry)`. |
Click to show internal directories.
Click to hide internal directories.