From 9c954f1411d833f43c98ad3bc607c4ec4f07aaf5 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Fri, 08 Jun 2007 18:50:35 +0000
Subject: [PATCH] Fixed an issue where the error log doesn't actually log messages. Also improved the performance of the loggers when they are disabled.

---
 opends/src/server/org/opends/server/tools/VerifyIndex.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/VerifyIndex.java b/opends/src/server/org/opends/server/tools/VerifyIndex.java
index b9511c8..919a1e4 100644
--- a/opends/src/server/org/opends/server/tools/VerifyIndex.java
+++ b/opends/src/server/org/opends/server/tools/VerifyIndex.java
@@ -29,6 +29,7 @@
 
 
 import org.opends.server.api.Backend;
+import org.opends.server.api.ErrorLogPublisher;
 import org.opends.server.backends.jeb.BackendImpl;
 import org.opends.server.backends.jeb.VerifyConfig;
 import org.opends.server.config.ConfigException;
@@ -70,7 +71,7 @@
  */
 public class VerifyIndex
 {
-  private static DN publisherDN = null;
+  private static ErrorLogPublisher errorLogPublisher = null;
   /**
    * Processes the command-line arguments and invokes the verify process.
    *
@@ -80,9 +81,9 @@
   {
     int retCode = mainVerifyIndex(args);
 
-    if(publisherDN != null)
+    if(errorLogPublisher != null)
     {
-      ErrorLogger.removeErrorLogPublisher(publisherDN);
+      ErrorLogger.removeErrorLogPublisher(errorLogPublisher);
     }
 
     if(retCode != 0)
@@ -347,11 +348,10 @@
     // of the verify process.
     try
     {
-      publisherDN = DN.decode("cn=Custom Logger for VerifyIndex");
-      ThreadFilterTextErrorLogPublisher publisher =
+      errorLogPublisher =
           new ThreadFilterTextErrorLogPublisher(Thread.currentThread(),
                                                 new TextWriter.STDOUT());
-      ErrorLogger.addErrorLogPublisher(publisherDN, publisher);
+      ErrorLogger.addErrorLogPublisher(errorLogPublisher);
 
     }
     catch(Exception e)

--
Gitblit v1.10.0