Reputation: 1517
Issue we are facing is that our log files are getting flooded, when we turn on http logging in log4j.
What we turn on in log4j
<AsyncLogger name="org.mule.module.http.internal.HttpMessageLogger" level="DEBUG"/>
What gets flooded in Log files,
DEBUG 2019-05-30 17:10:27,841 [pool-70-thread-5] com.amazonaws.1.11.453.shade.request: Received successful response: 200, AWS Request ID: 3c336641-*******
DEBUG 2019-05-30 17:10:27,841 [pool-70-thread-5] com.amazonaws.1.11.453.shade.requestId: x-amzn-RequestId: 3c336641-*********** DEBUG 2019-05-30 17:10:27,853 [pool-70-thread-6] com.amazonaws.1.11.453.shade.request: Sending Request: POST https://sqs.us-east-1.amazonaws.com / *****
DEBUG 2019-05-30 17:10:27,853 [pool-70-thread-6] com.amazonaws.1.11.453.shade.auth.AWS4Signer: AWS4 Canonical Request: '"POST
Please suggest, what we need to do to turn off these logs, we want the HTTP logger to be on for our other http request debugging.
Upvotes: 0
Views: 253
Reputation: 8021
To minimize the logs, you two options.
Option-1 You have to add the below configuration in log4j2 configurations. You can add multiple packages after identifying.
<logger name="com.amazonaws" level="OFF">
<AppenderRef ref="Console"/>
<AppenderRef ref="File"/>
</logger>
Option-2 You can use the below in the config file.
<AsyncLogger name="org.mule.module.http.internal.HttpMessageLogger" level="ERROR"/>
In this case , only error details will be printed.
Upvotes: 1