# error when  using requestInfoExtractor / responseInfoExtractor

**URL:** <https://community.gatling.io/t/error-when-using-requestinfoextractor-responseinfoextractor/495>\
**Category:** Gatling (Open-Source)\
**Created:** [July 17, 2013, 2:18pm UTC](https://community.gatling.io/t/error-when-using-requestinfoextractor-responseinfoextractor/495 "2013-07-17T14:18:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nat\_M](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nat\_M](https://community.gatling.io/u/Nat_M)\
**Post date:** [July 17, 2013, 2:18pm UTC](https://community.gatling.io/t/error-when-using-requestinfoextractor-responseinfoextractor/495/1 "2013-07-17T14:18:20Z")

</div>

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.\_  
import java.net.URLEncoder

class RecordedSimulation extends Simulation {

val httpProtocol = http  
.baseURL(“[http://localhost](http://localhost):ZZZZ”)  
.proxy(“localhost”,ZZZZ).httpsPort(YYYY)  
.acceptEncodingHeader(“gzip”)  
.connection(“close”)  
.userAgentHeader(“SMTH”)  
.requestInfoExtractor( (request: Request) =\> { ListString } )  
.responseInfoExtractor( (response: Response) =\> { ListString } )

…

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

---

<div class="post-metadata">

**Author:** ![Nicolas\_R](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@Nicolas\_R](https://community.gatling.io/u/Nicolas_R)\
**Post date:** [July 18, 2013, 8:04pm UTC](https://community.gatling.io/t/error-when-using-requestinfoextractor-responseinfoextractor/495/2 "2013-07-18T20:04:20Z")

</div>

Hi,

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

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

Does it help ?

cheers  
Nicolas

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [July 21, 2013, 1:02pm UTC](https://community.gatling.io/t/error-when-using-requestinfoextractor-responseinfoextractor/495/3 "2013-07-21T13:02:55Z")

</div>

For the record, this change is mentioned here: [https://github.com/excilys/gatling/wiki/Gatling-2#wiki-http-misc](https://github.com/excilys/gatling/wiki/Gatling-2#wiki-http-misc)

---

<div class="post-metadata">

**Author:** ![Nat\_M](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nat\_M](https://community.gatling.io/u/Nat_M)\
**Post date:** [July 24, 2013, 5:55pm UTC](https://community.gatling.io/t/error-when-using-requestinfoextractor-responseinfoextractor/495/4 "2013-07-24T17:55:37Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [July 24, 2013, 8:33pm UTC](https://community.gatling.io/t/error-when-using-requestinfoextractor-responseinfoextractor/495/5 "2013-07-24T20:33:06Z")

</div>

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).

Stéphane
