From 1139517e24b69a84280e498df1ccc5afb42d615b Mon Sep 17 00:00:00 2001 From: Bryazgin Date: Mon, 22 Apr 2024 13:09:37 -0400 Subject: [PATCH] do log.debug() only if needed --- .../main/java/com/datahub/graphql/GraphQLController.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/metadata-service/graphql-servlet-impl/src/main/java/com/datahub/graphql/GraphQLController.java b/metadata-service/graphql-servlet-impl/src/main/java/com/datahub/graphql/GraphQLController.java index 85d310883b738..ce5b906ca8bc2 100644 --- a/metadata-service/graphql-servlet-impl/src/main/java/com/datahub/graphql/GraphQLController.java +++ b/metadata-service/graphql-servlet-impl/src/main/java/com/datahub/graphql/GraphQLController.java @@ -137,12 +137,7 @@ CompletableFuture> postGraphQL(HttpEntity httpEnt "Errors while executing graphQL query: %s, result: %s, errors: %s", queryJson, executionResult.toSpecification(), executionResult.getErrors())); } else { - if (log.isDebugEnabled()) { - log.debug( - String.format( - "Executed graphQL query: %s, result: %s", - queryJson, executionResult.toSpecification())); - } + log.debug("Executed graphQL query: {}, result: {}", queryJson, () -> executionResult.toSpecification()); } /*