]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5697 Remove E/S response and add exception to log
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 6 Oct 2014 14:26:13 +0000 (16:26 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 6 Oct 2014 14:29:17 +0000 (16:29 +0200)
server/sonar-server/src/main/java/org/sonar/server/search/SearchClient.java

index 4c8b26f4baea47fa32aa45140c70b693e45c8c2f..3db7c216dde32196b1e8fa6c8cafd896235a4aee 100644 (file)
@@ -98,21 +98,9 @@ public class SearchClient extends TransportClient implements Startable {
           fullProfile.stop("ES Request: %s", request.toString().replaceAll("\n", ""));
         }
       }
-
-      if (profiling.isProfilingEnabled(Profiling.Level.FULL)) {
-        if (ToXContent.class.isAssignableFrom(response.getClass())) {
-          XContentBuilder debugResponse = XContentFactory.jsonBuilder();
-          debugResponse.startObject();
-          ((ToXContent) response).toXContent(debugResponse, ToXContent.EMPTY_PARAMS);
-          debugResponse.endObject();
-          fullProfile.stop("ES Response: %s", debugResponse.string());
-        } else {
-          fullProfile.stop("ES Response: %s", response.toString());
-        }
-      }
       return response;
     } catch (Exception e) {
-      LOGGER.error("could not execute request: " + response);
+      LOGGER.error("could not execute request: " + response, e);
       throw new IllegalStateException("ES error: ", e);
     }
   }