I have a Java application, built with Gradle along side using a log4j2.xml file for logging purposes. In my java app, I have an asynchronous s3 client uploading a file to a bucket, however once the thread returns a response it LOGS the contents of the file which I do not want.
I have tried modifying the log4j2.xml file to set the logging level of the "aws-java-sdk" module to "OFF" but have had no success as building that app with the new configuration results in the same logging of the contents.
This is the current log4j2.xml I have:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<Console name="JsonAppender" target="SYSTEM_OUT">
<JsonTemplateLayout eventTemplateUri="classpath:EcsLayout.json"/>
</Console>
</Appenders>
<Loggers>
<Logger name="JsonLogger" level="INFO" additivity="false">
<AppenderRef ref="JsonAppender"/>
</Logger>
<Root level="info">
<AppenderRef ref="JsonAppender"/>
</Root>
</Loggers>
</Configuration>