error when using requestInfoExtractor / responseInfoExtractor

Hi, I am trying to get the request / response being written into simulation.log however I get an error

“value requestInfoExtractor is not a member of io.gatling.http.config.HttpProtocolBuilder
possible cause: maybe a semicolon is missing before `value requestInfoExtractor’?”

I am using Gatling 2

The code looks somewhat like this:

import io.gatling.core.Predef._
import io.gatling.core.session.Expression
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.Headers.Names._
import io.gatling.http.Headers.Values._
import scala.concurrent.duration._
import bootstrap._
import assertions._

class RecordedSimulation extends Simulation {

val httpProtocol = http
.requestInfoExtractor( (request: Request) => { ListString } )
.responseInfoExtractor( (response: Response) => { ListString } )

setUp(scn.inject(atOnce(1 user))).protocols(httpProtocol)


That’s something that changed in Gatling2, here is the correct signature now :

http.extraInfoExtractor((requestStatus, session, request, response) => List.empty)

Does it help ?


For the record, this change is mentioned here:


thank you both for the replies, most helpful, the logging of requests / responses now works in the console. I actually expected to see them in the “simulation.log” as per this statement in the documentation " The extra data will be appended to the relative records in the simulation.log file "?

for the full picture I have also enabled this option in the logback.xml :

It has also clarified few differences I observed around HTTP class in recording and documentation.

– Natalie

If you use an extractor that returns a non empty List, this data should be logged in simulation.log.
If you enable so DEBUG/TRACE loggers in logback.xml, logback will log requests and responses (default appender is console).