1
2
3
4
5
6
7 package org.mule.endpoint.outbound;
8
9 import org.mule.api.MuleEvent;
10 import org.mule.api.MuleException;
11 import org.mule.api.processor.MessageProcessor;
12 import org.mule.util.ObjectUtils;
13
14 import org.apache.commons.logging.Log;
15 import org.apache.commons.logging.LogFactory;
16
17 public class OutboundLoggingMessageProcessor implements MessageProcessor
18 {
19 protected final transient Log logger = LogFactory.getLog(getClass());
20
21 public MuleEvent process(MuleEvent event) throws MuleException
22 {
23 if (logger.isDebugEnabled())
24 {
25 logger.debug("sending event: " + event);
26 }
27
28 return event;
29 }
30
31 @Override
32 public String toString()
33 {
34 return ObjectUtils.toString(this);
35 }
36 }