Author: davsclaus
Date: Thu May 15 23:41:42 2008
New Revision: 656947
URL: http://svn.apache.org/viewvc?rev=656947&view=rev
Log:
better logging and added TODO
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java?rev=656947&r1=656946&r2=656947&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
Thu May 15 23:41:42 2008
@@ -58,11 +58,14 @@
* Invoked whenever we should be polled
*/
public void run() {
- LOG.debug("Starting to poll");
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Starting to poll: " + this.getEndpoint());
+ }
try {
poll();
} catch (Exception e) {
- LOG.warn("Caught: " + e, e);
+ // TODO: We should not swallow this but handle it better. See
CAMEL-501
+ LOG.warn("An exception occured while polling: " +
this.getEndpoint() + ": " + e.getMessage(), e);
}
}
@@ -106,7 +109,7 @@
/**
* The polling method which is invoked periodically to poll this consumer
*
- * @throws Exception
+ * @throws Exception can be thrown if an exception occured during polling
*/
protected abstract void poll() throws Exception;