From 1d5d1a6a4a0a58d6bb4803527dacb6641c027816 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Tue, 28 Jan 2014 13:34:12 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1288 :    Migrate I18n and logging support to i18n framework and SLF4J

---
 opendj3-server-dev/src/server/org/opends/server/loggers/debug/DebugTracer.java |  172 ---------------------------------------------------------
 1 files changed, 0 insertions(+), 172 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/loggers/debug/DebugTracer.java b/opendj3-server-dev/src/server/org/opends/server/loggers/debug/DebugTracer.java
index a3a309f..e17931b 100644
--- a/opendj3-server-dev/src/server/org/opends/server/loggers/debug/DebugTracer.java
+++ b/opendj3-server-dev/src/server/org/opends/server/loggers/debug/DebugTracer.java
@@ -33,10 +33,6 @@
 import org.opends.server.loggers.LogCategory;
 
 import java.util.Map;
-import com.sleepycat.je.OperationStatus;
-import com.sleepycat.je.Transaction;
-import com.sleepycat.je.DatabaseEntry;
-import com.sleepycat.je.Database;
 
 /**
  * Class for source-code tracing at the method level.
@@ -382,174 +378,6 @@
   }
 
   /**
-   * Log a JE database access event.
-   *
-   * @param level the level of the log message.
-   * @param status status of the JE operation.
-   * @param database the database handle.
-   * @param txn  transaction handle (may be null).
-   * @param key  the key to dump.
-   * @param data the data to dump.
-   */
-  public void debugJEAccess(LogLevel level, OperationStatus status,
-                            Database database, Transaction txn,
-                            DatabaseEntry key, DatabaseEntry data)
-  {
-    if(DebugLogger.debugEnabled())
-    {
-      StackTraceElement[] stackTrace = null;
-      StackTraceElement[] filteredStackTrace = null;
-      StackTraceElement callerFrame = null;
-      for (PublisherSettings settings : publisherSettings)
-      {
-        TraceSettings activeSettings = settings.classSettings;
-        Map<String, TraceSettings> methodSettings = settings.methodSettings;
-
-        if (shouldLog(DebugLogCategory.MESSAGE, activeSettings) || methodSettings != null)
-        {
-          if(stackTrace == null)
-          {
-            stackTrace = Thread.currentThread().getStackTrace();
-          }
-          if (callerFrame == null)
-          {
-            callerFrame = getCallerFrame(stackTrace);
-          }
-
-          String signature = callerFrame.getMethodName();
-
-          // Specific method settings still could exist. Try getting
-          // the settings for this method.
-          if(methodSettings != null)
-          {
-            TraceSettings mSettings = methodSettings.get(signature);
-
-            if (mSettings == null)
-            {
-              // Try looking for an undecorated method name
-              int idx = signature.indexOf('(');
-              if (idx != -1)
-              {
-                mSettings =
-                    methodSettings.get(signature.substring(0, idx));
-              }
-            }
-
-            // If this method does have a specific setting and it is not
-            // suppose to be logged, continue.
-            if (mSettings != null)
-            {
-              if(!shouldLog(DebugLogCategory.MESSAGE, mSettings))
-              {
-                continue;
-              }
-              else
-              {
-                activeSettings = mSettings;
-              }
-            }
-          }
-
-          String sl = callerFrame.getFileName() + ":" +
-              callerFrame.getLineNumber();
-
-          if (filteredStackTrace == null && activeSettings.stackDepth > 0)
-          {
-            filteredStackTrace =
-                DebugStackTraceFormatter.SMART_FRAME_FILTER.
-                    getFilteredStackTrace(stackTrace);
-          }
-
-          settings.debugPublisher.traceJEAccess(activeSettings, signature,
-                                                sl, status, database, txn,
-                                                key, data, filteredStackTrace);
-        }
-      }
-    }
-  }
-
-  /**
-   * Log a protocol element.
-   *
-   * @param level the level of the log message.
-   * @param elementStr the string representation of protocol element.
-   */
-  public void debugProtocolElement(LogLevel level, String elementStr)
-  {
-    if(DebugLogger.debugEnabled() && elementStr != null)
-    {
-      StackTraceElement[] stackTrace = null;
-      StackTraceElement[] filteredStackTrace = null;
-      StackTraceElement callerFrame = null;
-      for (PublisherSettings settings : publisherSettings)
-      {
-        TraceSettings activeSettings = settings.classSettings;
-        Map<String, TraceSettings> methodSettings = settings.methodSettings;
-
-        if (shouldLog(DebugLogCategory.MESSAGE, activeSettings) || methodSettings != null)
-        {
-          if(stackTrace == null)
-          {
-            stackTrace = Thread.currentThread().getStackTrace();
-          }
-          if (callerFrame == null)
-          {
-            callerFrame = getCallerFrame(stackTrace);
-          }
-
-          String signature = callerFrame.getMethodName();
-
-          // Specific method settings still could exist. Try getting
-          // the settings for this method.
-          if(methodSettings != null)
-          {
-            TraceSettings mSettings = methodSettings.get(signature);
-
-            if (mSettings == null)
-            {
-              // Try looking for an undecorated method name
-              int idx = signature.indexOf('(');
-              if (idx != -1)
-              {
-                mSettings =
-                    methodSettings.get(signature.substring(0, idx));
-              }
-            }
-
-            // If this method does have a specific setting and it is not
-            // suppose to be logged, continue.
-            if (mSettings != null)
-            {
-              if(!shouldLog(DebugLogCategory.MESSAGE, mSettings))
-              {
-                continue;
-              }
-              else
-              {
-                activeSettings = mSettings;
-              }
-            }
-          }
-
-          String sl = callerFrame.getFileName() + ":" +
-              callerFrame.getLineNumber();
-
-          if (filteredStackTrace == null && activeSettings.stackDepth > 0)
-          {
-            filteredStackTrace =
-                DebugStackTraceFormatter.SMART_FRAME_FILTER.
-                    getFilteredStackTrace(stackTrace);
-          }
-
-          settings.debugPublisher.traceProtocolElement(activeSettings, signature,
-                                                       sl, elementStr,
-                                                       filteredStackTrace);
-        }
-      }
-    }
-  }
-
-  /**
    * Gets the name of the class this tracer traces.
    *
    * @return The name of the class this tracer traces.

--
Gitblit v1.10.0