public static void setLogFile(String logFile, String className) {
    try {
      Logger logger = Logger.getLogger(className);
      FileHandler fileTxt = new FileHandler(logFile);
      java.util.logging.Formatter formatterTxt = new SimpleFormatter();
      fileTxt.setFormatter(formatterTxt);
      logger.addHandler(fileTxt);
    } catch (IOException | SecurityException ex) {
      Logger.getLogger(className).log(Level.SEVERE, null, ex);
    }
  }