Exemple #1
0
 protected static void setApplication(String name) {
   try {
     jmri.Application.setApplicationName(name);
   } catch (IllegalArgumentException ex) {
     log.warn("Unable to set application name", ex);
   } catch (IllegalAccessException ex) {
     log.warn("Unable to set application name", ex);
   }
 }
Exemple #2
0
  /**
   * Set and log some startup information. This is intended to be the central connection point for
   * common startup and logging.
   *
   * @param name Program/application name as known by the user
   */
  protected static void setStartupInfo(String name) {
    // Set the application name
    try {
      jmri.Application.setApplicationName(name);
    } catch (IllegalArgumentException ex) {
      log.warn("Unable to set application name", ex);
    } catch (IllegalAccessException ex) {
      log.warn("Unable to set application name", ex);
    }

    // Log the startup information
    log.info(Log4JUtil.startupInfo(name));
  }