public static synchronized void stopApplication() {
   if (appStarted) {
     appStarted = false;
     LogHolder.detach();
     log.info("Log Viewer Shutdown");
   }
 }
  public static synchronized void startApplication() {
    if (!appStarted) {
      appStarted = true;
      log.info("Log Viewer Startup");

      try {
        final boolean autoAttach = PortletPropsValues.PERMEANCE_LOG_VIEWER_AUTOATTACH_ENABLED;

        if (autoAttach) {
          log.info("Autoattaching logger");
          LogHolder.attach();
        } else {
          log.info("NOT autoattaching logger");
        }
      } catch (final Exception e) {
        log.error(e);
      }
    }
  }