Package org.opends.server.loggers
Class TraceSettings
- java.lang.Object
-
- org.opends.server.loggers.TraceSettings
-
- All Implemented Interfaces:
ConfigurationChangeListener<DebugTargetCfg>
public final class TraceSettings extends Object implements ConfigurationChangeListener<DebugTargetCfg>
This class encapsulates the trace settings in effect at a given tracing scope.
-
-
Field Summary
Fields Modifier and Type Field Description static TraceSettings
DISABLED
A TraceSettings object representing a fully disabled trace state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResult
applyConfigurationChange(DebugTargetCfg config)
Applies the configuration changes to this change listener.org.opends.server.loggers.TraceSettings.Level
getLevel()
Get the level of this setting.int
getStackDepth()
Get the level of stack frames to include.boolean
isConfigurationChangeAcceptable(DebugTargetCfg config, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener.boolean
isIncludeCause()
Get whether the cause exception is included in exception messages.boolean
isNoArgs()
Get whether method arguments should be logged.boolean
isNoRetVal()
Get whether method return values should be logged.protected static TraceSettings
parseTraceSettings(String value)
Parse trace settings from the string representation.String
toString()
-
-
-
Field Detail
-
DISABLED
public static final TraceSettings DISABLED
A TraceSettings object representing a fully disabled trace state.
-
-
Method Detail
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(DebugTargetCfg config, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListener
Indicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptable
in interfaceConfigurationChangeListener<DebugTargetCfg>
- Parameters:
config
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed change is acceptable, orfalse
if it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(DebugTargetCfg config)
Description copied from interface:ConfigurationChangeListener
Applies the configuration changes to this change listener.- Specified by:
applyConfigurationChange
in interfaceConfigurationChangeListener<DebugTargetCfg>
- Parameters:
config
- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
parseTraceSettings
protected static TraceSettings parseTraceSettings(String value)
Parse trace settings from the string representation.- Parameters:
value
- the trace settings string to be parsed.- Returns:
- the trace settings parsed from the string.
-
getLevel
public org.opends.server.loggers.TraceSettings.Level getLevel()
Get the level of this setting.- Returns:
- the level of this setting.
-
isNoArgs
public boolean isNoArgs()
Get whether method arguments should be logged.- Returns:
- if method arguments should be logged.
-
isNoRetVal
public boolean isNoRetVal()
Get whether method return values should be logged.- Returns:
- if method return values should be logged.
-
getStackDepth
public int getStackDepth()
Get the level of stack frames to include.- Returns:
- the level of stack frames to include.
-
isIncludeCause
public boolean isIncludeCause()
Get whether the cause exception is included in exception messages.- Returns:
- if the cause exception is included in exception messages.
-
-