Excluding Maven logs from console logging

10 views
Skip to first unread message

andrewbu...@gmail.com

unread,
May 6, 2020, 12:38:28 AM5/6/20
to Maven JMeter Plugin Users
Hi group,

I have a log4j2 configuration for my test which logs my test timing and JSR pre and post processor logs in JSON format to console. This runs in a Docker container in AWS which means I have automatic log push to AWS Cloudwatch.

Running via the Maven plugin means that the console logging is wrapped up in Maven logging, where each of the log entries is formatted in JSON syntax as intended but prefixed with Maven's INFO log level:

[INFO] -------------------------------------------------------
[INFO]  P E R F O R M A N C E    T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Executing test: refdata_unittest.in.jmx
[INFO] Arguments for forked JMeter JVM: [java, -Xms1024M, -Xmx1024M, -Dunittest.testname=refdata_unittest, -Dunittest.path.logs=C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference\target/jmeter/logs, -Dlog4j.configurationFile=file://C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference/log4j2.xml, -Djava.awt.headless=true, -jar, ApacheJMeter-5.1.1.jar, -d, C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference\target\jmeter, -j, C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference\target\jmeter\logs\refdata_unittest.in.jmx.log, -l, C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference\target\jmeter\results\refdata_unittest.in.csv, -n, -q, C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference\refdata_unittest.threadgroups.conf, -q, C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference\urls.pp03.conf, -q, C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference\global.conf, -t, C:\dev\performance-test\api\automated-main-wlm\Unit-Test\Reference\target\jmeter\testFiles\refdata_unittest.in.jmx, -Dsun.net.http.allowRestrictedHeaders, true]
[INFO]
[INFO] {"timestamp":"2020-05-06T04:09:05.108Z","level":"INFO","log":"JmeterLog","class":"o.a.j.u.JMeterUtils","m":"Setting Locale to en_AU"}
[INFO] {"timestamp":"2020-05-06T04:09:05.128Z","level":"INFO","log":"JmeterLog","class":"o.a.j.JMeter","m":"Loading user properties from: user.properties"}

Is there any way to avoid having log4j2 stdout console logging from being routed via Maven's logging?
Reply all
Reply to author
Forward
0 new messages