Search code examples
jmeter

View Jmeter logs in Jenkins console


I have been executing Jmeter tests from Jenkins without any issues. But i couldn't see custom messages(log.info output) on Jenkins console to view the progress. Is there any workaround available to see the logs?


Solution

  • You can amend JMeter logging configuration so it would write the messages which normally go to jmeter.log file to the console

    1. Add the following lines to <Appenders> section of the log4j2.xml file:

      <Console name="STDOUT" target="SYSTEM_OUT">
        <PatternLayout pattern="%d %p %c{1.}: %m%n"/>
      </Console>
      
    2. Add the following line to <Loggers><Root> section:

       <AppenderRef ref="STDOUT"/>
      

    Once done you will see the same messages as in jmeter.log file going to Jenkins console.