public static void prettyFormatResponseToLog(@NotNull Logger logger, @NotNull HttpResponse response) {
    if (logger.isDebugEnabled()) {
      try {
        String content = TaskResponseUtil.getResponseContentAsString(response);
        Header header = response.getEntity().getContentType();
        String contentType = header == null ? "text/plain" : StringUtil.toLowerCase(header.getElements()[0].getName());
        if (contentType.contains("xml")) {
          TaskUtil.prettyFormatXmlToLog(logger, content);
        }
        else if (contentType.contains("json")) {
          TaskUtil.prettyFormatJsonToLog(logger, content);
        }
        else {
          logger.debug(content);
        }
      }
      catch (IOException e) {
        logger.error(e);
      }
    }
  }
public static void prettyFormatResponseToLog(@NotNull Logger logger, @NotNull HttpResponse response)