camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <nestor.urqu...@gmail.com>
Subject Logging from route not working
Date Mon, 30 Apr 2012 02:21:27 GMT
Hello guys,

I have setup a simple route:

package com.krfs.orchestration.camel.route;

import org.apache.camel.LoggingLevel;
import org.apache.camel.builder.RouteBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SampleRouteBuilder extends RouteBuilder {
    Logger log =
LoggerFactory.getLogger(SampleRouteBuilder.class.getName());
    
    @Override
    public void configure() {
        log.debug("Configuring dummy route");
        from("direct:start").log(LoggingLevel.DEBUG, "Processing ${id}");
        
    }
}

Then I get the DEBUG message straight from the code ("Configuring dummy
route") however I do not get the DEBUG message from within the Camel route
("Processing ${id}")

Any ideas why?

2012-04-29 22:15:27,801 DEBUG
[com.krfs.orchestration.camel.route.SampleRouteBuilder] -   Configuring
dummy route
2012-04-29 22:15:27,845 DEBUG [org.apache.camel.spring.SpringCamelContext] -  
onApplicationEvent:
org.springframework.context.event.ContextRefreshedEvent[source=Root
WebApplicationContext: startup date [Sun Apr 29 22:15:00 EDT 2012]; root of
context hierarchy]
2012-04-29 22:15:27,846 INFO [org.apache.camel.spring.SpringCamelContext] -  
Apache Camel 2.9.2 (CamelContext: camel-1) is starting
2012-04-29 22:15:27,847 INFO
[org.apache.camel.management.ManagementStrategyFactory] -   JMX enabled.
Using ManagedManagementStrategy.
2012-04-29 22:15:27,863 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Starting JMX agent
on server: com.sun.jmx.mbeanserver.JmxMBeanServer@6f878144
2012-04-29 22:15:27,869 INFO
[org.apache.camel.management.DefaultManagementLifecycleStrategy] -  
StatisticsLevel at All so enabling load performance statistics
2012-04-29 22:15:27,873 DEBUG
[org.apache.camel.impl.DefaultExecutorServiceManager] -   Created new
ScheduledThreadPool for source:
org.apache.camel.management.DefaultManagementLifecycleStrategy@4304c9a6 with
name: ManagementLoadTask. ->
java.util.concurrent.ScheduledThreadPoolExecutor@6f52d3a9
2012-04-29 22:15:27,874 DEBUG
[org.apache.camel.support.TimerListenerManager] -   Started scheduled
TimerListener task to run with interval 1000 ms
2012-04-29 22:15:27,925 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=context,name="camel-1"
2012-04-29 22:15:27,925 DEBUG
[org.apache.camel.support.TimerListenerManager] -   Added TimerListener:
org.apache.camel.management.mbean.ManagedCamelContext@6115d451
2012-04-29 22:15:27,954 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=services,name=DefaultTypeConverter(0x68200cae)
2012-04-29 22:15:28,001 INFO
[org.apache.camel.impl.converter.AnnotationTypeConverterLoader] -   Found 3
packages with 15 @Converter classes to load
2012-04-29 22:15:28,474 INFO
[org.apache.camel.impl.converter.DefaultTypeConverter] -   Loaded 170 core
type converters (total 170 type converters)
2012-04-29 22:15:28,474 DEBUG
[org.apache.camel.impl.converter.DefaultTypeConverter] -   Loading
additional type converters ...
2012-04-29 22:15:28,475 DEBUG
[org.apache.camel.impl.converter.AnnotationTypeConverterLoader] -   Loading
file META-INF/services/org/apache/camel/TypeConverter to retrieve list of
packages, from url:
jar:file:/Users/nestor/Downloads/apache-tomcat-7.0.22/krfs-app/ROOT/WEB-INF/lib/camel-core-2.9.2.jar!/META-INF/services/org/apache/camel/TypeConverter
2012-04-29 22:15:28,477 DEBUG
[org.apache.camel.impl.converter.AnnotationTypeConverterLoader] -   No
additional package names found in classpath for annotated type converters.
2012-04-29 22:15:28,478 DEBUG
[org.apache.camel.impl.converter.DefaultTypeConverter] -   Loading
additional type converters done
2012-04-29 22:15:28,479 INFO
[org.apache.camel.impl.converter.DefaultTypeConverter] -   Loaded additional
0 type converters (total 170 type converters) in 0.004 seconds
2012-04-29 22:15:28,483 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=services,name=EndpointRegistry(0x9134b1a)
2012-04-29 22:15:28,485 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=services,name=DefaultExecutorServiceManager(0x431d8faa)
2012-04-29 22:15:28,486 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=services,name=SharedProducerServicePool(0x2014030)
2012-04-29 22:15:28,486 DEBUG
[org.apache.camel.impl.SharedProducerServicePool] -   Starting service pool:
org.apache.camel.impl.SharedProducerServicePool@2014030
2012-04-29 22:15:28,487 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=services,name=DefaultInflightRepository(0x73c659d3)
2012-04-29 22:15:28,488 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=services,name=DefaultShutdownStrategy(0x1000c9c8)
2012-04-29 22:15:28,489 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=services,name=DefaultPackageScanClassResolver(0x78731200)
2012-04-29 22:15:28,672 DEBUG
[org.apache.camel.impl.DefaultComponentResolver] -   Found component: direct
in registry: null
2012-04-29 22:15:28,673 DEBUG
[org.apache.camel.impl.DefaultComponentResolver] -   Found component: direct
via type: org.apache.camel.component.direct.DirectComponent via:
META-INF/services/org/apache/camel/component/direct
2012-04-29 22:15:28,681 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=components,name="direct"
2012-04-29 22:15:28,682 DEBUG [org.apache.camel.impl.DefaultComponent] -  
Creating endpoint uri=[direct://start], path=[start], parameters=[{}]
2012-04-29 22:15:28,690 DEBUG [org.apache.camel.spring.SpringCamelContext] -  
direct://start converted to endpoint: Endpoint[direct://start] by component:
org.apache.camel.component.direct.DirectComponent@122f8e3e
2012-04-29 22:15:28,691 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=endpoints,name="direct://start"
2012-04-29 22:15:28,736 DEBUG
[org.apache.camel.processor.interceptor.DefaultChannel] -   Initialize
channel for target: 'Log[Processing ${id}]'
2012-04-29 22:15:28,750 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=tracer,name=Tracer(0x74730024)
2012-04-29 22:15:28,765 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=errorhandlers,name="DefaultErrorHandlerBuilder(ref:CamelDefaultErrorHandlerBuilder)"
2012-04-29 22:15:28,774 DEBUG [org.apache.camel.spring.SpringCamelContext] -  
Warming up route id: route1 having autoStartup=true
2012-04-29 22:15:28,774 DEBUG [org.apache.camel.impl.RouteService] -  
Starting services on route: route1
2012-04-29 22:15:28,777 DEBUG [org.apache.camel.impl.RouteService] -  
Starting child service on route: route1 ->
Instrumentation:route[DelegateAsync[UnitOfWork(Channel[Log(route1)[Processing
${id}]])]]
2012-04-29 22:15:28,780 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=threadpools,name="DefaultErrorHandler(0x5a0768e0)"
2012-04-29 22:15:28,780 DEBUG
[org.apache.camel.impl.DefaultExecutorServiceManager] -   Created new
ScheduledThreadPool for source:
DefaultErrorHandler[TraceInterceptor[Log[Processing ${id}]]] with name:
ErrorHandlerRedeliveryTask. ->
java.util.concurrent.ScheduledThreadPoolExecutor@1c76784d
2012-04-29 22:15:28,780 DEBUG
[org.apache.camel.processor.DefaultErrorHandler] -   Redelivery enabled:
false on error handler: DefaultErrorHandler[TraceInterceptor[Log[Processing
${id}]]]
2012-04-29 22:15:28,780 DEBUG [org.apache.camel.impl.RouteService] -  
Starting child service on route: route1 ->
DelegateAsync[UnitOfWork(RouteContextProcessor[Channel[Log(route1)[Processing
${id}]]])]
2012-04-29 22:15:28,780 DEBUG [org.apache.camel.impl.RouteService] -  
Starting child service on route: route1 ->
UnitOfWork(RouteContextProcessor[Channel[Log(route1)[Processing ${id}]]])
2012-04-29 22:15:28,781 DEBUG [org.apache.camel.impl.RouteService] -  
Starting child service on route: route1 -> Channel[Log(route1)[Processing
${id}]]
2012-04-29 22:15:28,789 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=routes,name="route1"
2012-04-29 22:15:28,789 DEBUG
[org.apache.camel.support.TimerListenerManager] -   Added TimerListener:
org.apache.camel.management.mbean.ManagedSuspendableRoute@139adc2c
2012-04-29 22:15:28,790 DEBUG [org.apache.camel.spring.SpringCamelContext] -  
Route: route1 >>> EventDrivenConsumerRoute[Endpoint[direct://start] ->
Instrumentation:route[DelegateAsync[UnitOfWork(RouteContextProcessor[Channel[Log(route1)[Processing
${id}]]])]]]
2012-04-29 22:15:28,790 DEBUG [org.apache.camel.spring.SpringCamelContext] -  
Starting consumer (order: 1000) on route: route1
2012-04-29 22:15:28,793 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=consumers,name=DirectConsumer(0x26e24671)
2012-04-29 22:15:28,793 INFO [org.apache.camel.spring.SpringCamelContext] -  
Route: route1 started and consuming from: Endpoint[direct://start]
2012-04-29 22:15:28,793 DEBUG [org.apache.camel.impl.DefaultComponent] -  
Creating endpoint uri=[spring-event://default], path=[default],
parameters=[{}]
2012-04-29 22:15:28,794 DEBUG [org.apache.camel.spring.SpringCamelContext] -  
spring-event://default converted to endpoint:
Endpoint[spring-event://default] by component:
org.apache.camel.component.event.EventComponent@4d5ec0c6
2012-04-29 22:15:28,795 DEBUG
[org.apache.camel.management.DefaultManagementAgent] -   Registered MBean
with objectname:
org.apache.camel:context=nestor-krfs.local/camel-1,type=endpoints,name="spring-event://default"
2012-04-29 22:15:28,796 INFO [org.apache.camel.spring.SpringCamelContext] -  
Total 1 routes, of which 1 is started.
2012-04-29 22:15:28,796 INFO [org.apache.camel.spring.SpringCamelContext] -  
Apache Camel 2.9.2 (CamelContext: camel-1) started in 0.949 seconds
2012-04-29 22:15:28,802 INFO
[com.krfs.utils.web.ApplicationServletContextListener] -   Servlet Context
initialized
2012-04-29 22:15:37,061 DEBUG [org.apache.camel.spring.SpringCamelContext] -  
onApplicationEvent:
org.springframework.context.event.ContextRefreshedEvent[source=WebApplicationContext
for namespace 'krfs-servlet': startup date [Sun Apr 29 22:15:28 EDT 2012];
parent: Root WebApplicationContext]

Thanks in advance,
-Nestor

--
View this message in context: http://camel.465427.n5.nabble.com/Logging-from-route-not-working-tp5674964p5674964.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message