Suddenly found the disk is about to burst
Log about 90 GB, the need to control the log output.
The output control Jmeter log
log of the output control Jmeter (jmeter.log)
log_level.jmeter=ERROR
log_level.jmeter.junit=DEBUG
In jmeter.properties, modify Jmeter log level is: ERROR, otherwise a huge log file jmeter.log, if it is needed to view detailed debugging information, log_level.jmeter can be set to DEBUG
For the assertion, if you want to print more detailed custom log into jmeter.log, you can do this:
Add a BeanShell Assertion, script like this fill in:
import org.apache.log4j.Logger;
if (increment==5 && vars.getObject("filterID").equals("NOT FOUND"))
{
Failure=true;
FailureMessage="Create filter for task 5 times in a row,all failed!";
log.error("user-defined error, FailureMessage: " + FailureMessage);
}
else
{
System.out.println("filterID="+vars.getObject("filterID"));
log.info("user-defined success, filterID=" + vars.getObject("filterID"));
}
If you are running to else inside, jmeter.log in prints this message:
2013/10/07 02:20:24 INFO - jmeter.util.BeanShellTestElement: user-defined success, filterID=4104
If you run into if inside, jmeter.log in prints this message:
2013/10/07 02:59:44 ERROR - jmeter.util.BeanShellTestElement: user-defined error, FailureMessage: Create filter for task 5 times in a row,all failed!
Log panel settings:
BACKGROUND: When using jmeter test interface, more complex interfaces require encryption, etc., may be required to print intermediate data during execution. jmeter did not provide data to show these special places and interfaces, but to use beanshell script, using the log output. However, also in the interior of jmeter log This log panel display, there is too much unnecessary information. In order to filter unwanted information, logging level set to ERROR, and outputs log.error used. jmeter not saved, have no place to set the logging level, and log the default display panel. So only by manually modifying configuration files need to achieve.
- Change the log level.
Under JMeter_HOME / bin, modified log4j2.xml.
change into
- The default log display panel.
Under JMeter_HOME / bin, modified jmeter.properties
Modify jmeter.loggerpanel.display = true, and uncommented.