code: protected void logError(Exception e, boolean logToErrorChannel) {
  
          if (logToErrorChannel) {
              LOG.error(e.getLocalizedMessage(), e);
          } else {
              LOG.info(e.getLocalizedMessage(), e);
          }
          // if an error was logged make sure that the flag to schedule a reload is reset
          setReloadScheduled(false);
      }
docs: Logs an exception that occurred.<p>
  
  @param e the exception to log
  @param logToErrorChannel if true erros should be written to the error channel instead of the info channel