diff --git a/proxyserver/src/main/java/com/lyft/data/proxyserver/ProxyHandler.java b/proxyserver/src/main/java/com/lyft/data/proxyserver/ProxyHandler.java
index bf09b71b..d8479e57 100644
--- a/proxyserver/src/main/java/com/lyft/data/proxyserver/ProxyHandler.java
+++ b/proxyserver/src/main/java/com/lyft/data/proxyserver/ProxyHandler.java
@@ -74,35 +74,25 @@ protected void postConnectionHook(
                       + " servlet path {} , toString {}, size {}", request.getRequestURL(),
               request.getRequestURI(), request.getServletPath(), request.toString(), request.getContentLength(), var9);
       
-      String requestHeaderLog = getErrorLogHeaders(request);
-      log.error(requestHeaderLog);
-
-      String responseHeaderLog = getErrorLogHeaders(response);
-      log.error(responseHeaderLog);
+      errorLogHeaders(request);
+      errorLogHeaders(response);;
       callback.failed(var9);
     }
   }
 
-  protected String getErrorLogHeaders(HttpServletRequest request) {
-    StringBuilder sb = new StringBuilder();
-    sb.append("------- error HttpServletRequest headers---------\n");
+  protected void errorLogHeaders(HttpServletRequest request) {
+    log.error("------- error HttpServletResponse headers---------");
     Enumeration<String> headers = request.getHeaderNames();
-    while (headers.hasMoreElements()) {
-      String header = headers.nextElement();
-      sb.append(header).append("->").append(request.getHeader(header)).append("\n");
+    for (String header : headers) {
+      log.error(header + "->" + request.getHeader(header));
+    }  }
+
+  protected void errorLogHeaders(HttpServletResponse response) {
+    log.error("------- error HttpServletResponse headers---------");
+    Collection<String> headers = response.getHeaderNames();
+    for (String header : headers) {
+      log.error(header + "->" + response.getHeader(header));
     }
-    return sb.toString();
-  }
-
-  protected String getErrorLogHeaders(HttpServletResponse response) {
-    StringBuilder sb = new StringBuilder();
-    sb.append("------- error HttpServletResponse headers---------\n");
-    Enumeration<String> headers = response.getHeaderNames();
-    while (headers.hasMoreElements()) {
-      String header = headers.nextElement();
-      sb.append(header).append("->").append(response.getHeader(header)).append("\n");
-    }
-    return sb.toString();
   }
 
   protected void debugLogHeaders(HttpServletRequest request) {
@@ -125,7 +115,6 @@ protected void debugLogHeaders(HttpServletResponse response) {
       }
     }
   }
-
   protected void debugLogHeaders(Request proxyRequest) {
     if (log.isDebugEnabled()) {
       log.debug("-------Request proxyRequest headers---------");