How to stop logging Gatling Requests

Hello everyone,

Disclaimer: this is a copy of my SO post, and I’m sorry if it’s beyond the forum’s etiquette. I may find my answer here, more likely than on SO.

I’m monitoring many web pages (around 4000), whose URLs are fed by a CSV file in the same Gatling test.

The problem is the test lasts forever. I suppose (but it may not be true) that the logging activity takes a long time. So I want to stop having the huge log table with

---- Requests ------------------------------------------------------------------
> Whatever
> Blah blah blah
> And so on
---- Errors --------------------------------------------------------------------
> You got it

… only to see if it makes my test last a bit shorter.

How should I do?

I tried editing my logback-test.xml file but the logs show even with the ERROR level.

<?xml version="1.0" encoding="UTF-8"?> %d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx true

Also, for all purposes, here is my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

dead_url_spotter
dead_url_spotter
1.0-SNAPSHOT

1.8 1.8 2.11.7 UTF-8

<gatling.version>2.2.3</gatling.version>

<scala-maven-plugin.version>3.2.2</scala-maven-plugin.version>
<gatling.maven.version>2.2.1</gatling.maven.version>

io.gatling gatling-app ${gatling.version} io.gatling gatling-recorder ${gatling.version} io.gatling.highcharts gatling-charts-highcharts ${gatling.version} org.scala-lang scala-library ${scala.version} com.typesafe.scala-logging scala-logging_2.12 3.7.2 org.json json LATEST io.gatling.highcharts gatling-charts-highcharts io.gatling gatling-app io.gatling gatling-recorder org.scala-lang scala-library com.googlecode.json-simple json-simple 1.1.1 org.json org.json LATEST com.cedarsoftware json-io 4.9.8 org.jmxtrans jmxtrans 263 org.slf4j slf4j-log4j12 log4j log4j org.jsoup jsoup 1.11.2 src/test/java net.alchim31.maven scala-maven-plugin ${scala-maven-plugin.version} org.codehaus.mojo exec-maven-plugin 1.2.1 java io.gatling gatling-maven-plugin 2.2.1 -Durl=http://localhost:9000 -DnumberOfUsers=10 -DnumberOfRepetitions=1 -DdurationMinutes=1 -DpauseBetweenRequestsMs=3000 -Ddebug=false src/test/resources src/test/resources/data target/gatling/results src/test/resources/bodies src/test/scala net.alchim31.maven scala-maven-plugin testCompile -Ybackend:GenBCode -Ydelambdafy:method -target:jvm-1.8 -deprecation -feature -unchecked -language:implicitConversions -language:postfixOps org.apache.maven.plugins maven-failsafe-plugin 2.20.1 ${skip.selenium.tests} none 1 false false runSeleniumTests integration-test integration-test

Thanks in advance for your help.

You’re using a very old, outdated version of Gatling, please upgrade and report again if your test still doesn’t stop.
The console logging has nothing to do with your test not stopping. You can disable it in gatling.conf.

Hello Stéphane,

Thanks for mentionning gatling.conf, it did help me.

Have a good day.

Zoé