Documentation
¶
Index ¶
- Variables
- func Fatal(logger logr.Logger, msg string, keysAndValues ...interface{})
- func FromContextOrGlobal(ctx context.Context) logr.Logger
- func GetLogLevel() string
- func NSMLogger(logger logr.Logger) nsmlog.Logger
- func New(name, level string) logr.Logger
- func SetupLevelChangeOnSignal(ctx context.Context, signals map[os.Signal]string, opts ...Option)
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Logger The global logger Logger logr.Logger )
Functions ¶
func FromContextOrGlobal ¶
FromContextOrGlobal return a logger from the passed context or the global logger.
func GetLogLevel ¶ added in v1.2.4
func GetLogLevel() string
GetLogLevel returns the current log level as a string.
func New ¶
New returns a new logger. The level may be "DEBUG" (V(1)) or "TRACE" (V(2)), any other string (e.g. "") is interpreted as "INFO" (V(0)). On first call the global Logger is set. The log level is stored in a package-level (global) variable. Any call to New(...) updates this shared log level for all loggers, including the initially created global Logger.
Types ¶
Click to show internal directories.
Click to hide internal directories.