You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/03/19 00:48:01 UTC

[GitHub] [nifi] MikeThomsen commented on a change in pull request #4148: NIFI-7264 Make jsonPath Expression Logging More Reasonable

MikeThomsen commented on a change in pull request #4148: NIFI-7264 Make jsonPath Expression Logging More Reasonable
URL: https://github.com/apache/nifi/pull/4148#discussion_r394726108
 
 

 ##########
 File path: nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/JsonPathEvaluator.java
 ##########
 @@ -46,7 +47,14 @@ public JsonPathEvaluator(final Evaluator<String> subject, final Evaluator<String
         Object result = null;
         try {
             result = documentContext.read(compiledJsonPath);
+        } catch (PathNotFoundException pnf) {
+            // it is valid for a path not to be found, keys may not be there
+            // do not spam the error log for this, instead we can log debug
+            LOGGER.debug("PathNotFoundException for JsonPath " + compiledJsonPath.getPath(), pnf);
 
 Review comment:
   Should be wrapped in a `isDebuggedEnabled` check

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


With regards,
Apache Git Services