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

jvergara
08.32.2007 ee3642c86959b44af3ff0e9fde9950a966527596
opends/src/quicksetup/org/opends/quicksetup/QuickSetupLog.java
@@ -45,6 +45,7 @@
  static public final String LOG_FILE_SUFFIX = ".log";
  static private File logFile = null;
  static private FileHandler fileHandler = null;
  /**
   * Creates a new file handler for writing log messages to the file indicated
@@ -55,7 +56,7 @@
  static public void initLogFileHandler(File file) throws IOException {
    if (!isInitialized()) {
      logFile = file;
      FileHandler fileHandler = new FileHandler(logFile.getCanonicalPath());
      fileHandler = new FileHandler(logFile.getCanonicalPath());
      fileHandler.setFormatter(new SimpleFormatter());
      Logger logger = Logger.getLogger("org.opends.quicksetup");
      logger.addHandler(fileHandler);
@@ -68,6 +69,22 @@
  }
  /**
   * Creates a new file handler for writing log messages of a given package
   * to the file indicated by <code>file</code>.
   * @param file log file to which log messages will be written.
   * @param packageName the name of the package of the classes that generate
   * log messages.
   * @throws IOException if something goes wrong
   */
  static public void initLogFileHandler(File file, String packageName)
  throws IOException {
    initLogFileHandler(file);
    Logger logger = Logger.getLogger(packageName);
    logger.addHandler(fileHandler);
    logger.setUseParentHandlers(false);
  }
  /**
   * Prevents messages written to loggers from appearing in the console
   * output.
   */