mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
08.50.2007 9c954f1411d833f43c98ad3bc607c4ec4f07aaf5
opends/src/server/org/opends/server/tools/RebuildIndex.java
@@ -48,6 +48,7 @@
import org.opends.server.core.LockFileManager;
import org.opends.server.types.*;
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.RebuildConfig;
import org.opends.server.admin.std.server.BackendCfg;
@@ -64,7 +65,7 @@
 */
public class RebuildIndex
{
  private static DN publisherDN = null;
  private static ErrorLogPublisher errorLogPublisher = null;
  /**
   * Processes the command-line arguments and invokes the rebuild process.
@@ -75,9 +76,9 @@
  {
    int retCode = mainRebuildIndex(args);
    if(publisherDN != null)
    if(errorLogPublisher != null)
    {
      ErrorLogger.removeErrorLogPublisher(publisherDN);
      ErrorLogger.removeErrorLogPublisher(errorLogPublisher);
    }
    if(retCode != 0)
@@ -336,11 +337,10 @@
    // of the verify process.
    try
    {
      publisherDN = DN.decode("cn=Custom Logger for RebuildIndex");
      ThreadFilterTextErrorLogPublisher publisher =
      errorLogPublisher =
          new ThreadFilterTextErrorLogPublisher(Thread.currentThread(),
                                                new TextWriter.STDOUT());
      ErrorLogger.addErrorLogPublisher(publisherDN, publisher);
      ErrorLogger.addErrorLogPublisher(errorLogPublisher);
    }
    catch(Exception e)