[logback.xml] How to log failed requests/responses?

911 views
Skip to first unread message

Eugene Abramchuk

unread,
Dec 7, 2016, 11:10:01 AM12/7/16
to Gatling User Group
When I put

        <logger name="io.gatling.http.ahc" level="DEBUG" />

to the logback.xml, it logs all the requests, if I raise it to

        <logger name="io.gatling.http.ahc" level="ERROR" />

it does not log anything any more.



The old links, the documentation and the sample logback.xml had all suffered link rot and/or are irrelevant now.

Konrad Laskoski

unread,
Dec 13, 2016, 4:04:30 AM12/13/16
to Gatling User Group
Hi, 
I have the same issue. Using gatling 2.2.3.
I could use extraInfoExtractor but i do not really know where to get information if checks have passed or failed.

Konrad Laskoski

unread,
Dec 13, 2016, 8:30:16 AM12/13/16
to Gatling User Group
As a wokaround I am using extraInfoExtractor from this page http://automationrhapsody.com/performance-testing-with-gatling-tips-and-tricks-for-advanced-usage/ . This works fine for me. Data are stored in symulation.log. I have also increased the file bufferSize from gatling.conf to get all data. 

Eugene Abramchuk

unread,
Dec 13, 2016, 12:49:46 PM12/13/16
to Gatling User Group
Thanks for the idea, Konrad! It would be nice to have this feature out of the box though (especially seeing it worked this way several versions ago)

Nikolay Degkin

unread,
Dec 14, 2016, 7:00:12 AM12/14/16
to Gatling User Group
You can try
level="WARN"


Eugene Abramchuk

unread,
Dec 14, 2016, 7:20:56 AM12/14/16
to Gatling User Group
WARN would log the fact that the error occurred, but not the failing request/response, as they are log level DEBUG:

18:49:23.456 [WARN ] i.g.h.a.ResponseProcessor - Request 'account.activate' failed: status.find.is(200), but actually found 401
18:49:23.456 [DEBUG] i.g.h.a.ResponseProcessor - 
>>>>>>>>>>>>>>>>>>>>>>>>>>
Request:
account.activate: KO status.find.is(200), but actually found 401
=========================
Session: ...

Eugene Abramchuk

unread,
Dec 15, 2016, 10:42:08 AM12/15/16
to Gatling User Group
I forked Gatling to fix this behaviour, but I see Stephane already solved it in gatling/master:

Reply all
Reply to author
Forward
0 new messages