code: protected void logError(HttpServletRequest request, HttpServletResponse response, String comment, Long before, Throwable cause) {
          final StringBuilder sb = new StringBuilder();
          sb.append(comment);
          sb.append(LF);
          sb.append("/= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =: ").append(getTitlePath(request));
          sb.append(LF).append(IND);
          try {
              buildRequestInfo(sb, request, response, /*showResponse*/true, /*showErrorFlush*/true);
          } catch (RuntimeException continued) {
              sb.append("*Failed to get request info: " + continued.getMessage());
              sb.append(LF);
          }
          final long after = System.currentTimeMillis();
          final String performanceView = convertToPerformanceView(after - before);
          sb.append("= = = = = = = = = =/ [").append(performanceView).append("] #").append(Integer.toHexString(cause.hashCode()));
          buildExceptionStackTrace(cause, sb); // extract stack trace manually
          final String msg = sb.toString().trim();
          if (isErrorLoggingReally(cause)) {
              // not use second argument here
              // because Logback loads classes in stack trace destroying hot deploy
              // so show stack trace added to the logging message
              logger.error(msg);
          } else {
              logger.debug(msg);
          }
      }
docs: -------------