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



##########
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:
       I did verify that the schema is logged but you're right the `schemaDef` 
variable is not set since this 
[commit](https://github.com/apache/sling-org-apache-sling-graphql-core/commit/9abddb77904a079a5c3c58de0901ac576fb6b53f#).
 The logs I had came for the previous version (0.0.9), my bad, but the code 
still needs to be fixed.




-- 
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:
us...@infra.apache.org


Reply via email to