I am running some tests with System.out.println and log statements within the test method. These are Junit Tests and are executed with JMeterSampler. The log statements within the Junit test method or the dependent jars are no where to be seen. Inside my test method i have a statement like
logger.info( "simple log" );
The simple log is nowhere to be seen. I have tried various things of setting log_level with categories in jmeter.properties but nothing helped.
I also have the necessity to use slf4j with log4j. So I redirected the commons-logging logs using the following jars,
- replacing commons-logging with jcl-over-slf4j
- adding
- slf4j-api,
- slf4j-log4j12 and
- log4j-1.2.7
- Removed logkit and excalibur-logging from the classpath
- Added log4j.configuration=file:/path/to/log4j.xml The appenders here are parsed and picked up on startup.
- Added a logger for the test class with stdout appender but still the logs from the test class are nowhere to be seen
- Have commented #log_config=logkit.xml in jmeter.propeties and the logkit file is totally non existent in the bin.Logkit and excalibur-logging are not in the classpath and logging of the jmeter framework works fine in jmeter-server.log -jmeter.log does not have any entries
The jmeter starts fine and reports the tests. The logs are important for a reason. How do I make jmeter to log the statements within the tests through log4j.xml in a jmeter.log?
Is there something very obvious that I am missing?