Documentation ¶
Index ¶
Constants ¶
const ( // LogInfo is the info level LogInfo = 0 // LogDebug is the debug level LogDebug = 5 // LogVerbose is an extra level more verbose than Debug LogVerbose = 10 )
Following are log severity levels to be used by registered services
Variables ¶
This section is empty.
Functions ¶
func UpdateLogLevel ¶
func UpdateLogLevel( d *v1alpha1.LogSetting, )
UpdateLogLevel updates log severity
Types ¶
type LogSetter ¶
type LogSetter struct {
// contains filtered or unexported fields
}
LogSetter watches for DebuggingConfiguration and changes log severity at run-time based on that custom resource configuration.
func RegisterForLogSettings ¶
func RegisterForLogSettings( ctx context.Context, componentNamespace, componentIdentifier string, logger logr.Logger, config *rest.Config, ) *LogSetter
RegisterForLogSettings will react to LogConfigurations change. Pod service account calling this must have permission to read LogConfigurations. LogConfigurations is the custom resource to be used to uniformly set log level for all component. By calling this method, any change in LogConfigurations.Spec will be processed and log severity set for affected component(s).
func (*LogSetter) SetDebugValue ¶
SetDebugValue sets severity for Debug
func (*LogSetter) SetDefaultValue ¶
SetDefaultValue sets default severity
func (*LogSetter) SetInfoValue ¶
SetInfoValue sets severity for Info
func (*LogSetter) SetVerboseValue ¶
SetVerboseValue sets severity for Verbose