bdelacretaz commented on a change in pull request #24:
URL: 
https://github.com/apache/sling-org-apache-sling-graphql-core/pull/24#discussion_r655270342



##########
File path: 
src/main/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutor.java
##########
@@ -219,16 +219,25 @@ public ValidationResult validate(@NotNull String query, 
@NotNull Map<String, Obj
                     }
                 }
                 if (LOGGER.isErrorEnabled()) {
-                    LOGGER.error("Query failed for Resource {}: query={} 
Errors:{}, schema={}",
-                            queryResource.getPath(), cleanLog.sanitize(query), 
errors, schemaDef);
+                    final String errorMessage = String.format("Query failed 
for Resource %s: query=%s Errors:%s",
+                            queryResource.getPath(), cleanLog.sanitize(query), 
errors);
+                    if (LOGGER.isDebugEnabled()) {
+                        LOGGER.error(String.format("%s, schema=%s", 
errorMessage, schemaDef));

Review comment:
       Did you verify that the schema is actually logged? It looks like the 
`schemaDef` variable is not set, looks like a bug in the existing code. Anyway, 
I'm not sure if logging the schema is useful, I'll discuss in SLING-10503




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to