1
2
3
4
5
6
7 package org.mule.routing;
8
9 import org.mule.DefaultMuleEvent;
10 import org.mule.api.MuleEvent;
11 import org.mule.api.routing.RoutingException;
12
13 import org.apache.commons.logging.Log;
14 import org.apache.commons.logging.LogFactory;
15
16
17
18
19
20
21
22 public class LoggingCatchAllStrategy extends AbstractCatchAllStrategy
23 {
24 private static final Log logger = LogFactory.getLog(DefaultMuleEvent.class);
25
26 public MuleEvent doCatchMessage(MuleEvent event) throws RoutingException
27 {
28 logger.warn(String.format("Message was not dispatched. No routing path was defined for it. Message: %s", event.getMessage()));
29 return event;
30 }
31 }