Gatling not logging request/response body

2,559 views
Skip to first unread message

Dinesh Gawande

unread,
Aug 18, 2016, 1:15:11 AM8/18/16
to Gatling User Group
I am debugging a Gatling script which is complaining about invalid request. I want to capture the request/response body to find out what is going wrong. I used logback.xml in its default configuration with the two highlighted lines uncommented. But nothing is getting logged at all. I am stuck with this since yesterday. Posted on stackoverflow as well but no response yet [https://stackoverflow.com/questions/38987960/gatling-not-logging-request-response]. 

<statusListener class="ch.qos.logback.core.status.NopStatusListener" />

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
        <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern>
        <immediateFlush>false</immediateFlush>
    </encoder>
</appender>

<!-- Uncomment for logging ALL HTTP request and responses -->
<logger name="io.gatling.http.ahc" level="TRACE" />
<logger name="io.gatling.http.response" level="TRACE" />
<!-- Uncomment for logging ONLY FAILED HTTP request and responses -->
<!-- <logger name="io.gatling.http.ahc" level="DEBUG" /> -->
<!-- <logger name="io.gatling.http.response" level="DEBUG" /> -->

<root level="DEBUG">
    <appender-ref ref="CONSOLE" />
</root>

Stéphane LANDELLE

unread,
Aug 18, 2016, 2:12:03 AM8/18/16
to gat...@googlegroups.com
Works for me, the problem is on your side.
Trying removing your statusListener so you can figure out possible logback configuration issues. 

Stéphane Landelle
GatlingCorp CEO


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

DK

unread,
Aug 18, 2016, 2:36:41 AM8/18/16
to Gatling User Group
Thanks for the quick response Stephane.

I removed statusListener and found that there were multiple SLF4J bindings for StaticLoggerBinder.class. I can remove the first binding but how to I get  ContextSelectorStaticBinder? Is this the possible problem?

GATLING_HOME is set to "C:\Gatling\gatling-charts-highcharts-bundle-2.2.2"
JAVA = ""C:\Program Files\Java\jdk1.8.0_74\bin\java.exe""
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Gatling/gatling-charts-highcharts-bundle-2.2.2/lib/test-utils-6.15.0.0-SNAPSHOT-jar-with-dependencies.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Gatling/gatling-charts-highcharts-bundle-2.2.2/lib/logback-classic-1.1.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages