camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gilday" <martin.li...@imap.cc>
Subject Re: loggingErrorHandler
Date Tue, 30 Sep 2008 11:00:17 GMT
Sorry I found the JIRA issue for it.  When I've switched to 1.5-SNAPSHOT
I can see that it is fixed now.

Thanks,
Martin.


----- Original message -----
From: "Martin Gilday" <martin.lists@imap.cc>
To: camel-user@activemq.apache.org
Date: Tue, 30 Sep 2008 11:52:34 +0100
Subject: loggingErrorHandler

Hi riders,

I'm trying to replace the default error logger with loggingErrorHandler.
 But when I run the follow routes shown below I get no log messages at
all.  When I delete the error handler line from my route builder then in
my logs I can see that the default dead letter channel kicks in and
retires the processor 5 times.  With the loggingErrorHandler all I see
in my log is "This is inside the processor" then nothing.  I have my
log4j default level set to debug.  Any ideas why this snippet may not be
working as I expect?

Routes routes = new RouteBuilder() {

  @Override
  public void configure() throws Exception {
    errorHandler(loggingErrorHandler("org.test"));

    from("seda:test").process(new Processor() {

      @Override
      public void process(final Exchange exchange) throws Exception {
        logger.info("This is inside the processor");
        throw new Exception("Fubar");
      }
    });
  }
};

CamelContext context = new DefaultCamelContext();
context.addRoutes(routes);
context.start();

ProducerTemplate<Exchange> template = context.createProducerTemplate();
template.sendBody("seda:test", "nothing");


Mime
View raw message