Can I write extracted JSON field from response body to simulation.log

Hi,

I am using Gatling 1.5.3

With ‘jsonPath’ I can extract JSON fields and with ‘responseInfoExtractor’ I can write custom information to simulation.log. I know how to write the whole response body to simulation.log, but what I really want is writing only one field extracted from the response body using JSON path to the log file. Is that possible?

Thank you very much!

Xiaowei Zhou

Hi,

That’s not possible with extraInfoExtractor in Gatling 1 as it doesn’t have access to the session. It is in Gatling 2 as the signature has changed.
You’d have to write into your own file, not simulation.log, with a exec(function).

Cheers,

Stéphane