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/tasks/ImportTask.java | 41 +++++++++++++++++++++++++++--------------
1 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/opends/src/server/org/opends/server/tasks/ImportTask.java b/opends/src/server/org/opends/server/tasks/ImportTask.java
index 6321313..3064ddb 100644
--- a/opends/src/server/org/opends/server/tasks/ImportTask.java
+++ b/opends/src/server/org/opends/server/tasks/ImportTask.java
@@ -29,7 +29,9 @@
import static org.opends.server.messages.TaskMessages.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
-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.logError;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import static org.opends.server.config.ConfigConstants.*;
@@ -66,11 +68,6 @@
*/
public class ImportTask extends Task
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tasks.ImportTask";
@@ -97,7 +94,6 @@
*/
@Override public void initializeTask() throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "initializeTask");
// If the client connection is available, then make sure the associated
@@ -221,7 +217,6 @@
*/
protected TaskState runTask()
{
- assert debugEnter(CLASS_NAME, "runTask");
// See if there were any user-defined sets of include/exclude attributes or
// filters. If so, then process them.
@@ -489,7 +484,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR,
e.getErrorMessage(), e.getErrorMessageID());
@@ -516,7 +514,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIFIMPORT_CANNOT_LOCK_BACKEND;
String message = getMessage(msgID, backend.getBackendID(),
@@ -534,7 +535,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "runTask", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_LDIFIMPORT_ERROR_DURING_IMPORT;
String message = getMessage(msgID, de.getErrorMessage());
@@ -544,7 +548,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIFIMPORT_ERROR_DURING_IMPORT;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -571,7 +578,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIFIMPORT_CANNOT_UNLOCK_BACKEND;
String message = getMessage(msgID, backend.getBackendID(),
@@ -592,7 +602,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR,
e.getErrorMessage(), e.getErrorMessageID());
--
Gitblit v1.10.0