Test error logs in gradle standard output

I have a simple java application that uses Junit as test platfrom and jboss as log manager,

At some point in my application, I log message using the error level.
When running tests, those logs are printed both in test reports and in the standard output of the console. I tried changing the logger appender to append in file, my logs are not in test report anymore but still present in the console.

One issue we have is that, those logs are not formatted correctly, for example log.errorf("Hello %s!", "formatted world");
will ouput :

  • “Hello formatted world!” in test report
  • “Hello %s!” in console

I tried switching testLogging off, using:

test {
    testLogging.showStandardStreams = false

But nothing change. Is there a way to deactivate those logs ?