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 TraceSettingsDISABLEDA TraceSettings object representing a fully disabled trace state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResultapplyConfigurationChange(DebugTargetCfg config)Applies the configuration changes to this change listener.org.opends.server.loggers.TraceSettings.LevelgetLevel()Get the level of this setting.intgetStackDepth()Get the level of stack frames to include.booleanisConfigurationChangeAcceptable(DebugTargetCfg config, List<LocalizableMessage> unacceptableReasons)Indicates whether the proposed change to the configuration is acceptable to this change listener.booleanisIncludeCause()Get whether the cause exception is included in exception messages.booleanisNoArgs()Get whether method arguments should be logged.booleanisNoRetVal()Get whether method return values should be logged.protected static TraceSettingsparseTraceSettings(String value)Parse trace settings from the string representation.StringtoString()
-
-
-
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:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein 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
trueif the proposed change is acceptable, orfalseif it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(DebugTargetCfg config)
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein 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.
-
-