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

Jean-Noël Rouvignac
21.01.2016 d8e799bd818c9f26198a2d586bc8c647068f82dd
opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java
@@ -39,12 +39,7 @@
import org.opends.server.api.plugin.PluginType;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.LockFileManager;
import org.opends.server.loggers.DebugLogger;
import org.opends.server.loggers.ErrorLogPublisher;
import org.opends.server.loggers.ErrorLogger;
import org.opends.server.loggers.JDKLogging;
import org.opends.server.loggers.TextErrorLogPublisher;
import org.opends.server.loggers.TextWriter;
import org.opends.server.protocols.ldap.LDAPAttribute;
import org.opends.server.tasks.ExportTask;
import org.opends.server.tools.tasks.TaskTool;
@@ -375,6 +370,7 @@
        new DirectoryServer.InitializationBuilder(configFile.getValue())
            .requireCryptoServices()
            .requireUserPlugins(PluginType.LDIF_EXPORT)
            .requireErrorAndDebugLogPublisher(out, err)
            .initialize();
      }
      catch (InitializationException ie)
@@ -382,20 +378,6 @@
        printWrappedText(err, ERR_CANNOT_INITIALIZE_SERVER_COMPONENTS.get(getExceptionMessage(ie)));
        return 1;
      }
      try
      {
        ErrorLogPublisher errorLogPublisher = TextErrorLogPublisher.getToolStartupTextErrorPublisher(
            new TextWriter.STREAM(out));
        ErrorLogger.getInstance().addLogPublisher(errorLogPublisher);
        DebugLogger.getInstance().addPublisherIfRequired(new TextWriter.STREAM(out));
      }
      catch (Exception e)
      {
        err.println("Error installing the custom error logger: " + stackTraceToSingleLineString(e));
        return 1;
      }
    }
    // See if there were any user-defined sets of include/exclude attributes or