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

boli
08.50.2007 9c954f1411d833f43c98ad3bc607c4ec4f07aaf5
opends/src/quicksetup/org/opends/quicksetup/util/InProcessServerController.java
@@ -36,7 +36,6 @@
import org.opends.server.loggers.ErrorLogger;
import org.opends.server.loggers.TextAccessLogPublisher;
import org.opends.server.loggers.AccessLogger;
import org.opends.server.types.DN;
import org.opends.server.types.Modification;
import org.opends.server.types.ResultCode;
import org.opends.server.types.LDIFImportConfig;
@@ -83,6 +82,12 @@
   */
  static private boolean serverHasBeenStarted = false;
  static private ErrorLogPublisher startupErrorPublisher;
  static private AccessLogPublisher startupAccessPublisher;
  static private DebugLogPublisher startupDebugPublisher;
  /**
   * Pushes messages published by the server loggers into OperationOutput.
   */
@@ -486,24 +491,18 @@
  static private void registerListenersForOuput() {
    try {
      DebugLogPublisher startupDebugPublisher =
      startupDebugPublisher =
              TextDebugLogPublisher.getStartupTextDebugPublisher(debugWriter);
      DebugLogger.addDebugLogPublisher(
              DN.decode("cn=QuickSetup,cn=Loggers,cn=config"),
              startupDebugPublisher);
      DebugLogger.addDebugLogPublisher(startupDebugPublisher);
      ErrorLogPublisher startupErrorPublisher =
      startupErrorPublisher =
              TextErrorLogPublisher.getStartupTextErrorPublisher(errorWriter);
      ErrorLogger.addErrorLogPublisher(
              DN.decode("cn=QuickSetup,cn=Loggers,cn=config"),
              startupErrorPublisher);
      ErrorLogger.addErrorLogPublisher(startupErrorPublisher);
      AccessLogPublisher startupAccessPublisher =
      startupAccessPublisher =
              TextAccessLogPublisher.getStartupTextAccessPublisher(
                      accessWriter, true);
      AccessLogger.addAccessLogPublisher(
              DN.decode("cn=QuickSetup,cn=Loggers,cn=config"),
              startupAccessPublisher);
      AccessLogger.addAccessLogPublisher(startupAccessPublisher);
    } catch (Exception e) {
      LOG.log(Level.INFO, "Error installing test log publishers: " +
@@ -511,6 +510,12 @@
    }
  }
  static private void unregisterListenersForOutput() {
    DebugLogger.removeDebugLogPublisher(startupDebugPublisher);
    ErrorLogger.removeErrorLogPublisher(startupErrorPublisher);
    AccessLogger.removeAccessLogPublisher(startupAccessPublisher);
  }
  static private String getMsg(String key, String... args) {
    return ResourceProvider.getInstance().getMsg(key, args);
  }