Display session attributes at every request


With Gatling 2.0.0.M3a, I relied on Session attributes being displayed to console when I enabled trace in logback.xml for debugging and validation.

After upgrading to Gatling 2.1.3, I no longer see the Session. I attempted to print extrainfo.session at the protocol level, but the Session was only displayed once at the beginning, not at every request as expected.

Is there a way to see the Session and its attributes at every request?


No idea why it doesn’t work for you.
It’s still there: https://github.com/gatling/gatling/blob/master/gatling-http/src/main/scala/io/gatling/http/ahc/AsyncHandlerActor.scala#L112-L130

I’ve just found an important difference in logback.xml:


After I changed logger name to “io.gatling.http”, I observed the old behavior. However, additional DEBUG logs are also displayed which I’m not sure are desirable:

15:55:43.163 [INFO ] i.g.h.a.HttpRequestAction$ - Sending request=userTimeout uri=https://host/cache: scenario=User Browsing, userId=4311122922473107827-0
15:55:43.169 [DEBUG] i.g.h.c.CacheHandling$ - Setting Etag “54920510-322d” for uri https://host/cache
15:55:43.169 [DEBUG] i.g.h.c.CacheHandling$ - Setting LastModified Wed, 17 Dec 2014 22:34:56 GMT for uri https://host/cache
15:55:43.170 [TRACE] i.g.h.a.AsyncHandlerActor -

Thank you, Stephane for quick help.

see https://github.com/gatling/gatling/issues/2509

Then, if you’re only interested in some informations, just set a more specific logger, like io.gatling.http.ahc.AsyncHandlerActor