|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.loggers.debug.DebugLogger
public class DebugLogger
A logger for debug and trace logging. DebugLogger provides a debugging management access point. It is used to configure the Tracers, as well as to register a per-class tracer. Various stub debug methods are provided to log different types of debug messages. However, these methods do not contain any actual implementation. Tracer aspects are later weaved to catch alls to these stub methods and do the work of logging the message. DebugLogger is self-initializing.
Nested Class Summary | |
---|---|
static interface |
DebugLogger.NoDebugTracing
Classes and methods annotated with @NoDebugTracing will not be weaved with debug logging statements by AspectJ. |
static interface |
DebugLogger.NoEntryDebugTracing
Methods annotated with @NoEntryDebugTracing will not be weaved with entry debug logging statements by AspectJ. |
static interface |
DebugLogger.NoExitDebugTracing
Methods annotated with @NoExitDebugTracing will not be weaved with exit debug logging statements by AspectJ. |
static interface |
DebugLogger.TraceThrown
Methods annotated with @TraceThrown will be weaved by AspectJ with debug logging statements when an exception is thrown from the method. |
Constructor Summary | |
---|---|
DebugLogger()
|
Method Summary | |
---|---|
static void |
addDebugLogPublisher(DebugLogPublisher publisher)
Add an debug log publisher to the debug logger. |
ConfigChangeResult |
applyConfigurationAdd(DebugLogPublisherCfg config)
Adds a new configuration to this add listener. |
ConfigChangeResult |
applyConfigurationChange(DebugLogPublisherCfg config)
Applies the configuration changes to this change listener. |
ConfigChangeResult |
applyConfigurationDelete(DebugLogPublisherCfg config)
Deletes an existing configuration from this delete listener. |
static boolean |
debugEnabled()
Indicates if debug logging is enabled. |
static DebugLogger |
getInstance()
Retrieve the singleton instance of this class. |
static DebugTracer |
getTracer()
Creates a new Debug Tracer for the caller class and registers it with the Debug Logger. |
static DebugTracer |
getTracer(java.lang.String className)
Returns the registered Debug Tracer for a traced class. |
void |
initializeDebugLogger(java.util.List<DebugLogPublisherCfg> configs)
Initializes all the debug log publishers. |
boolean |
isConfigurationAddAcceptable(DebugLogPublisherCfg config,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed addition of a new configuration is acceptable to this add listener. |
boolean |
isConfigurationChangeAcceptable(DebugLogPublisherCfg config,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener. |
boolean |
isConfigurationDeleteAcceptable(DebugLogPublisherCfg config,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener. |
static void |
removeAllDebugLogPublishers()
Removes all existing debug log publishers from the logger. |
static boolean |
removeDebugLogPublisher(DebugLogPublisher publisher)
Remove an debug log publisher from the debug logger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DebugLogger()
Method Detail |
---|
public static void addDebugLogPublisher(DebugLogPublisher publisher)
publisher
- The error log publisher to add.public static boolean removeDebugLogPublisher(DebugLogPublisher publisher)
publisher
- The debug log publisher to remove.
public static void removeAllDebugLogPublishers()
public void initializeDebugLogger(java.util.List<DebugLogPublisherCfg> configs) throws ConfigException, InitializationException
configs
- The debug log publisher configurations.
ConfigException
- If an unrecoverable problem arises in the process of
performing the initialization as a result of the server
configuration.
InitializationException
- If a problem occurs during initialization that is not
related to the server configuration.public boolean isConfigurationAddAcceptable(DebugLogPublisherCfg config, java.util.List<Message> unacceptableReasons)
isConfigurationAddAcceptable
in interface ConfigurationAddListener<DebugLogPublisherCfg>
config
- The configuration that will be added.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed addition is
acceptable, or false
if it is not.public boolean isConfigurationChangeAcceptable(DebugLogPublisherCfg config, java.util.List<Message> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<DebugLogPublisherCfg>
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.
true
if the proposed change is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationAdd(DebugLogPublisherCfg config)
applyConfigurationAdd
in interface ConfigurationAddListener<DebugLogPublisherCfg>
config
- The configuration that will be added.
public ConfigChangeResult applyConfigurationChange(DebugLogPublisherCfg config)
applyConfigurationChange
in interface ConfigurationChangeListener<DebugLogPublisherCfg>
config
- The new configuration containing the changes.
public boolean isConfigurationDeleteAcceptable(DebugLogPublisherCfg config, java.util.List<Message> unacceptableReasons)
isConfigurationDeleteAcceptable
in interface ConfigurationDeleteListener<DebugLogPublisherCfg>
config
- The configuration that will be deleted.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed deletion is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationDelete(DebugLogPublisherCfg config)
applyConfigurationDelete
in interface ConfigurationDeleteListener<DebugLogPublisherCfg>
config
- The existing configuration that will be deleted.
public static boolean debugEnabled()
public static DebugLogger getInstance()
public static DebugTracer getTracer()
public static DebugTracer getTracer(java.lang.String className)
className
- The name of the class tracer to retrieve.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |