From b0a7e3cf4a65ea95c79cf002596428d0aed2e26e Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Tue, 22 May 2007 23:30:15 +0000
Subject: [PATCH] Remove the dependence on AspectJ for all non method-entry and method-exit related debug messages. All debug statements will now work w/o weaving enabled. However, method-entry and method-exit debug messages work only with weaving enabled.
---
opends/src/server/org/opends/server/core/SchemaConfigManager.java | 103 +++++++++++++++++++++++++++------------------------
1 files changed, 54 insertions(+), 49 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/SchemaConfigManager.java b/opends/src/server/org/opends/server/core/SchemaConfigManager.java
index 8db2e53..7122e5b 100644
--- a/opends/src/server/org/opends/server/core/SchemaConfigManager.java
+++ b/opends/src/server/org/opends/server/core/SchemaConfigManager.java
@@ -73,10 +73,10 @@
import org.opends.server.util.LDIFReader;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.debug.DebugLogger.debugCaught;
-import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.ErrorLogger.*;
+import static org.opends.server.loggers.debug.DebugLogger.*;
+import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -97,6 +97,11 @@
public class SchemaConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
+ /**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
// The schema that has been parsed from the server configuration.
private Schema schema;
@@ -179,7 +184,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_GET_MR_BASE;
@@ -274,7 +279,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_CONFIG_SCHEMA_MR_UNABLE_TO_DETERMINE_ENABLED_STATE;
@@ -319,7 +324,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_GET_CLASS;
@@ -340,7 +345,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_INSTANTIATE;
@@ -362,7 +367,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_INITIALIZE;
@@ -384,7 +389,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
msgID = MSGID_CONFIG_SCHEMA_MR_CONFLICTING_MR;
@@ -424,7 +429,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_GET_SYNTAX_BASE;
@@ -518,7 +523,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_UNABLE_TO_DETERMINE_ENABLED_STATE;
@@ -562,7 +567,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_GET_CLASS;
@@ -583,7 +588,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INSTANTIATE;
@@ -605,7 +610,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INITIALIZE;
@@ -627,7 +632,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CONFLICTING_SYNTAX;
@@ -716,7 +721,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ie);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ie);
}
throw ie;
@@ -725,7 +730,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_LIST_FILES;
@@ -831,7 +836,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_OPEN_FILE;
@@ -867,7 +872,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_READ_LDIF_ENTRY;
@@ -894,7 +899,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
@@ -916,7 +921,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
attrTypeSyntax = new AttributeTypeSyntax();
@@ -957,7 +962,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
ocSyntax = new ObjectClassSyntax();
@@ -998,7 +1003,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
nfSyntax = new NameFormSyntax();
@@ -1039,7 +1044,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
dcrSyntax = new DITContentRuleSyntax();
@@ -1081,7 +1086,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
dsrSyntax = new DITStructureRuleSyntax();
@@ -1123,7 +1128,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
mruSyntax = new MatchingRuleUseSyntax();
@@ -1183,7 +1188,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_ATTR_TYPE;
@@ -1205,7 +1210,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_ATTR_TYPE;
@@ -1235,7 +1240,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_ATTR_TYPE;
@@ -1254,7 +1259,7 @@
// This should never happen.
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
@@ -1282,7 +1287,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_OC;
@@ -1304,7 +1309,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_OC;
@@ -1335,7 +1340,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_OC;
@@ -1353,7 +1358,7 @@
// This should never happen.
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
@@ -1381,7 +1386,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_NAME_FORM;
@@ -1403,7 +1408,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_NAME_FORM;
@@ -1434,7 +1439,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_NAME_FORM;
@@ -1452,7 +1457,7 @@
// This should never happen.
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
@@ -1480,7 +1485,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DCR;
@@ -1502,7 +1507,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DCR;
@@ -1533,7 +1538,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_DCR;
@@ -1551,7 +1556,7 @@
// This should never happen.
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
@@ -1580,7 +1585,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DSR;
@@ -1602,7 +1607,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DSR;
@@ -1633,7 +1638,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_DSR;
@@ -1651,7 +1656,7 @@
// This should never happen.
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
@@ -1680,7 +1685,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_MRU;
@@ -1702,7 +1707,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_MRU;
@@ -1733,7 +1738,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_MRU;
@@ -1751,7 +1756,7 @@
// This should never happen.
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
--
Gitblit v1.10.0