Jmeter logger has the date format as yyyy/MM/dd hh:mm:ss
I wanted to change the format and add milliseconds and timezone offset to it(yyyy/MM/dd hh:mm:ss.SSSZ) as well. Is there a way to format this date format?
JMeter uses Avalon logging with the default format of:
log_format=%{time:yyyy/MM/dd HH:mm:ss} %5.5{priority} - %{category}: %{message} %{throwable}
Check out PatternFormatter documentation to learn how to amend timestamps according to your requirement and put the updated line in user.properties file (lives in /bin folder of your JMeter installation).
JMeter restart will be required to pick the property up.
See Apache JMeter Properties Customization Guide for additional information on JMeter properties types and ways of working with them.
For timestamp in the results .jtl files, Set this property:
jmeter.save.saveservice.timestamp_format=yyyy/MM/dd hh:mm:ss.SSSZ
either as a -D
java opt at startup, or in JMeter bin/saveservice.properties
For timestamp in jmeter.log
log_format=%{time:yyyy/MM/dd hh:mm:ss.SSSZ} %5.5{priority} - %{category}: %{message} %{throwable}
in user.properties
root.log
by editing log4j.conf
in jmeter/bin folder. The log4j pattern contains a timestamp pattern.