code: protected void logException(E ex, HttpServletRequest req) {
  
          if (LOG.isErrorEnabled() && getStatus().value() >= 500 || LOG.isInfoEnabled()) {
              Marker marker = MarkerFactory.getMarker(ex.getClass().getName());
  
              String uri = req.getRequestURI();
              if (req.getQueryString() != null) {
                  uri += '?' + req.getQueryString();
              }
              String msg = String.format("%s %s ~> %s", req.getMethod(), uri, getStatus());
  
              if (getStatus().value() >= 500) {
                  LOG.error(marker, msg, ex);
  
              } else if (LOG.isDebugEnabled()) {
                  LOG.debug(marker, msg, ex);
  
              } else {
                  LOG.info(marker, msg);
              }
          }
      }
docs: Logs the exception; on ERROR level when status is 5xx, otherwise on INFO level without stack
  trace, or DEBUG level with stack trace. The logger name is
  {@code cz.jirutka.spring.exhandler.handlers.RestExceptionHandler}.
  
  @param ex The exception to log.
  @param req The current web request.