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 sveltos services
Variables ¶
This section is empty.
Functions ¶
func UpdateLogLevel ¶
func UpdateLogLevel( d *sveltosv1alpha1.DebuggingConfiguration, )
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, component sveltosv1alpha1.Component, logger logr.Logger, config *rest.Config, ) *LogSetter
RegisterForLogSettings will react to DebuggingConfiguration change. Pod service account calling this must have permission to read DebuggingConfiguration. DebuggingConfiguration is the custom resource to be used to uniformly set log level for all sveltos component. By calling this method, any change in DebuggingConfiguration.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