From 455897cc245b67d929f409a93cfa7106e835cc1f Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 01 Mar 2007 03:27:06 +0000
Subject: [PATCH] This removes old debug logging framework method calls that are going to be automatically instrumented by AspectJ. Non instrumented debug method calls are updated to use the new debug framework methods. However, the new debug logging framework is not yet active as the Aspects are not weaved in. After this revision, debug logging will be disabled in the server until the new AOP framework is complete.
---
opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java | 114 +++++++++++++++++++++++++++++++++++---------------------
1 files changed, 71 insertions(+), 43 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java b/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
index e5920a4..4474658 100644
--- a/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
+++ b/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
@@ -48,7 +48,9 @@
import org.opends.server.types.SearchFilter;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -66,11 +68,6 @@
public class SynchronizationProviderConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.SynchronizationProviderConfigManager";
@@ -88,7 +85,6 @@
*/
public SynchronizationProviderConfigManager()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -112,7 +108,6 @@
public void initializeSynchronizationProviders()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSynchronizationProviders");
registeredProviders = new ConcurrentHashMap<DN,SynchronizationProvider>();
@@ -128,8 +123,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SYNCH_CANNOT_GET_CONFIG_BASE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -185,8 +182,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
String message = getMessage(msgID, String.valueOf(providerDN),
@@ -224,8 +223,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
String message = getMessage(msgID, String.valueOf(providerDN),
@@ -260,8 +261,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
String message = getMessage(msgID, String.valueOf(providerDN),
@@ -279,8 +282,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
String message = getMessage(msgID, String.valueOf(providerClassName),
@@ -299,8 +304,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
String message = getMessage(msgID, String.valueOf(providerClassName),
@@ -367,8 +374,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
DN providerDN = configEntry.getDN();
@@ -393,7 +398,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
unacceptableReason.append(getMessage(msgID, String.valueOf(providerDN),
@@ -422,7 +430,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
unacceptableReason.append(getMessage(msgID,
@@ -457,7 +468,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
unacceptableReason.append(getMessage(msgID,
@@ -481,7 +495,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -497,7 +514,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -529,8 +549,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN providerDN = configEntry.getDN();
@@ -561,7 +579,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -602,7 +623,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -643,7 +667,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -672,7 +699,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -694,7 +724,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -725,7 +758,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_ERROR_INITIALIZING_PROVIDER;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -783,8 +819,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -804,8 +838,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
// NYI
@@ -830,8 +862,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -850,8 +880,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
// NYI
--
Gitblit v1.10.0