How to print HTTP response body in the console and file

I’m new to Gatling.
I could not find a simple complete example on how to see the full response body.

This is my simple example

`
class CreateNotecard extends Simulation
{

val baseURL = “https://portal.apps.stg.bluescape.com
val httpConf = http
.baseURL(baseURL)
.userAgentHeader(“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36”)

val scn = scenario(“Create a notecard”)
.exec(http(“Get authenticity token”)
.get("/users/sign_in")
.check(bodyString.saveAs(“BODY”)))

setUp(
scn.inject(atOnceUsers(1))
).protocols(httpConf)

}
`

How can I print bodyString into a file or in the console?

Thanks in advance

I could not find a simple complete example on how to see the full response body.

Have you tried searching for “debugging” in our documentation (there’s even a search box that could help)?

uncomment

in $GATLING_HOME/conf/logback.xml