logsettings

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 27

Documentation

Index

Constants

View Source
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 GetInstance

func GetInstance() *LogSetter

GetInstance returns LogSetter instance

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

func (l *LogSetter) SetDebugValue(debugSeverity int)

SetDebugValue sets severity for Debug

func (*LogSetter) SetDefaultValue

func (l *LogSetter) SetDefaultValue(defaultSeverity int)

SetDefaultValue sets default severity

func (*LogSetter) SetInfoValue

func (l *LogSetter) SetInfoValue(infoSeverity int)

SetInfoValue sets severity for Info

func (*LogSetter) SetVerboseValue

func (l *LogSetter) SetVerboseValue(verboseSeverity int)

SetVerboseValue sets severity for Verbose

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL