Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext returns the global logr.Logger or the one stored by a prior call to NewContext.
func Logrus ¶
Logrus creates a function that writes genericr.Entry to out using a logrus format. The resulting logrus.Level depends on Entry.Error and Entry.Level:
- Entry.Error ≠ nil → logrus.ErrorLevel
- Entry.Level < debug → logrus.InfoLevel
- Entry.Level ≥ debug → logrus.DebugLevel
func NewContext ¶
NewContext returns a copy of ctx containing logger. Retrieve it using FromContext.
func SetLogFunc ¶
SetLogFunc replaces the global logr.Logger with log that gets called when an entry's level is at or below verbosity. (Only the most important entries are passed when verbosity is zero.) Before this is called, the global logr.Logger is a no-op.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.