Writing to Gatling's Simulation.log file

Hi,

Currently I see that simulation.log file is written to/updated at the end of the scenario run with the results. Is there a way that the result is written to the simulation.log file as the test runs? Only if I manually open the log file can I see the results, but if I just refresh the folder the contents of the file are not updated while the test is running.

I am using Gatling 3.8.3 on Windows 10.

Thanks & Regards,
Uddipan

Warning: this file is an internal, not for end-user usage. Format can change any time without further notice.

Hi Stephane,

I understand that. But is there a way to update the contents as the test is running? Or it will only write the contents at the end of the test run?

Hi,

You can configure this in logback-test.xml file who is included in the gatling maven project for setting the display degree : WARN, TRACE, DEBUG…

After, in your test class define:

protected static final Logger logger = LoggerFactory.getLogger(<YourClassName>.class);

… and use it as this example:

logger.warn("RAMP_DURATION variable (milliseconds): " + RAMP_DURATION.toMillis());

See you soon,