Logging requests->responses to a custom file

Hi. I want to use Gatling to perform load tests of a machine learning model deployed in a microservice. I use a big csv with handcrafted or real input to build the requests and I want to do both load testing and track responses. I would like to track the request id with the response which is a simple Json with a couple of numbers so that I can use it to later do extra analysis with the data coming from the test request/responses pairs.

Is there a way to use a custom logger to send such data to a log file? Or there is a way to accumulate requestid/response-values into a sequence that can be persisted after the simulation is done?