Daniel
Daniel

Reputation: 958

Disable logging for large payloads - Mule 3.3.0

I need to find a way to prevent large payloads to be logged when an exception occurs. I'm sending large files (about 30MB) through FTP, when the connection times out the whole payload content is logged.

[01-10-2012 10:32:59:059] ERROR exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message               : Connection timed out (java.net.ConnectException)
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Connection timed out (java.net.ConnectException)
  java.net.PlainSocketImpl:-2 (null)
2. Connection timed out (java.net.ConnectException) (org.mule.transport.ConnectException)
  org.mule.transport.ftp.FtpConnector:556 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/ConnectExcepti
on.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

[01-10-2012 10:32:59:059] ERROR exception.DefaultMessagingExceptionStrategy: Message being processed is: 
+++++++++++LARGE_PAYLOAD_CONTENT++++++++++++++
.
.
.
.
.

Upvotes: 2

Views: 955

Answers (3)

Ale Sequeira
Ale Sequeira

Reputation: 2039

That was fixed for 3.3.1 (EE only): http://www.mulesoft.org/jira/browse/MULE-6268

Upvotes: 0

David Dossot
David Dossot

Reputation: 33413

With Mule 3.3.0 the only option is to set configure the logger of org.mule.exception.DefaultMessagingExceptionStrategy to FATAL (via the Log4j configuration).

This has been fixed in Mule 3.3.1 / 3.4.0-SNAPSHOT: full message payload is now logged only if the logger of org.mule.exception.DefaultMessagingExceptionStrategy is set to DEBUG.

Upvotes: 3

Anshu
Anshu

Reputation: 7853

Try setting mule.verbose.exceptions to false

-Dmule.verbose.exceptions=false

Upvotes: 0

Related Questions