Bug 59845 - JSONPostProcessor should not log an error level message for JSON elements not being found
Summary: JSONPostProcessor should not log an error level message for JSON elements not...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.0
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-12 09:05 UTC by Justin McCartney
Modified: 2016-07-12 17:11 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin McCartney 2016-07-12 09:05:16 UTC
The Response JSON extractor logs a message at ERROR level if the specified JSON path expression cannot be found.

For example:

2016/07/12 09:44:16 ERROR - jmeter.extractor.json.jsonpath.JSONPostProcessor: Error processing JSON content in Response Json Extractor, message:No results for path: $['companyId']

I believe that this should not be even an INFO level message.  Consider the XPathExtractor which logs no message for a element that is missing or cannot be found.

As the JSONPostProcessor also sets the variable to a specific default value if it cannot be found I feel the log message should be moved to debug level logging.

This is causing our logs to be spammed with false "errors" when in fact the server has failed to respond under load and therefore the json element will not be present.
Comment 1 Felix Schumacher 2016-07-12 17:11:54 UTC
Date: Tue Jul 12 17:11:08 2016
New Revision: 1752317

URL: http://svn.apache.org/viewvc?rev=1752317&view=rev
Log:
Log messages about JSON Path mismatches at debug level instead of error.

Bugzilla Id: 59845

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/extractor/json/jsonpath/JSONManager.java
    jmeter/trunk/xdocs/changes.xml