login responses to special file

Hey! How are you doing guys?

I’m trying to log the responses to files. Something like, if I have an http(“request-name”) , then after the run I would have a file with the json response, something like request-name-response.json.
Is there a simpe way to achieve this? thanks!!!

PS: I tried using this info extractor: (sta, ses, req, res) => List(res.getResponseBody)
but there are two problems:
1- I would LOVE to have every response in its own file
2- If the response was too long, then I would get an error message saying that the buffer was not long enough and got only a part of the respnse printed out to the simulation.log file.

Many, many thanks!

Important question: do you realize that this will probably hurt the overall performance?

That really depends on how big the responses are and how much load it involves, doesn’t it? If you’re not exceeding IO bandwith or disk space limits file writing is actually surprisingly cheap.

Running with full logging of everything can be terribly useful if done carefully.