How to modify JMeter log4j settings in Blazemeter


Article ID: 182982


Updated On:




In Jmeter you can modify the log4j2.xml in its bin directory in order for the jmeter.log to contain more extensive information for debugging purposes.
What needs to be done for Blazemeter to take changes in this file into account?


Blazemeter SaaS


If you upload a JMeter script (JMX file) to a Blazemeter test, Blazemeter wraps it into a Taurus configuration file under the hood as it uses Taurus to run the test.
In order for the log4j2.xml to be recognized, following needs to be done:
  1. a Taurus configuration file needs to be uploaded to the Blazemeter scenario along with the JMX and the modified log4j2.xml.
  2. this configuration yml file needs to be set as the file to start the test with.

The configuration file needs to be set up so it performs following functions:
1. move the log4j2.xml to the proper directory /shared/.bzt/jmeter-taurus/<JMeter Version>/bin/
    This is done by the Taurus ShellExec service.
    NOTE: The <JMeter Version> needs to match the JMeter version in the Blazemeter test configuration.
2. execute the JMeter script.

Here is an example of how a typical scenario to accomplish the above should look like: