camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject Is the tracing working with spring-event ?
Date Fri, 17 Oct 2008 10:30:12 GMT

Hi, 

I have try to activate the tracing inside my java class like this :

        Tracer tracer = new Tracer();
        tracer.setLogLevel(LoggingLevel.DEBUG);
        tracer.setTraceInterceptors(true);
        tracer.getFormatter().setShowBody(true);
        tracer.getFormatter().setShowBodyType(true);
        camelContext.addInterceptStrategy(tracer);

or inside the springcamel-context file :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
    ">
    
    <!--

	<bean id="camelTracer"
class="org.apache.camel.processor.interceptor.Tracer">
		<property name="traceExceptions" value="false" />
		<property name="traceInterceptors" value="true" />
		<property name="logLevel" value="DEBUG" />
	</bean>

	<bean id="traceFormatter"
class="org.apache.camel.processor.interceptor.TraceFormatter">
		<property name="showBody" value="true" />
		<property name="showBodyType" value="false" />
		<property name="showHeaders" value="true" />
		<property name="showBreadCrumb" value="false" />
	</bean>

	-->
	<camelContext id="camel" trace="true"
		xmlns="http://activemq.apache.org/camel/schema/spring">
		<route>
			<from uri="event://default" />
			<to uri="stream:out" />
		</route>
	</camelContext>
</beans>

but the log does not display the header/body ... information

Here is the trace using log4j - DEBUG :

[                          main] DefaultCamelContext            INFO  JMX
enabled. Using InstrumentationLifecycleStrategy.
[                          main] CamelContextFactoryBean        DEBUG Found
JAXB created routes: [Route[ [From[event://default]] -> [To[stream:out]]]]
[                          main] SpringCamelContext             DEBUG
Publishing event:
org.springframework.context.event.ContextRefreshedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@dd87b2:
display name
[org.springframework.context.support.ClassPathXmlApplicationContext@dd87b2];
startup date [Fri Oct 17 12:23:04 CEST 2008]; root of context hierarchy]
[                          main] SpringCamelContext             DEBUG
Starting the CamelContext now that the ApplicationContext has started
[                          main] DefaultInstrumentationAgent    DEBUG
Starting JMX agent on server: com.sun.jmx.mbeanserver.JmxMBeanServer@70be88
[                          main] DefaultInstrumentationAgent    DEBUG
Registered MBean with objectname:
org.apache.camel:context=dell-charles/camel,name=context
[                          main] DefaultComponent               DEBUG
Creating endpoint uri=[event://default], path=[default], parameters=[{}]
[                          main] DefaultCamelContext            DEBUG
event://default converted to endpoint: Endpoint[event://default] by
component: org.apache.camel.component.event.EventComponent@19fe451
[                          main] DefaultInstrumentationAgent    DEBUG
Registered MBean with objectname:
org.apache.camel:context=dell-charles/camel,type=endpoints,name="event://default\?id=0xdaebda6"
[                          main] DefaultInstrumentationAgent    DEBUG
Registered MBean with objectname:
org.apache.camel:context=dell-charles/camel,type=processors,nodeid=to1,name="To[stream:out]"
[                          main] DefaultComponentResolver       DEBUG Found
component: stream via type:
org.apache.camel.component.stream.StreamComponent via
META-INF/services/org/apache/camel/component/stream
[                          main] DefaultComponent               DEBUG
Creating endpoint uri=[stream:out], path=[out], parameters=[{}]
[                          main] DefaultCamelContext            DEBUG
stream:out converted to endpoint: Endpoint[stream:out] by component:
org.apache.camel.component.stream.StreamComponent@111ded2
[                          main] DefaultInstrumentationAgent    DEBUG
Registered MBean with objectname:
org.apache.camel:context=dell-charles/camel,type=endpoints,name="stream:out\?id=0xb3679825"
[                          main] DefaultInstrumentationAgent    DEBUG
Registered MBean with objectname:
org.apache.camel:context=dell-charles/camel,type=routes,name="node1"
[                          main] DefaultInstrumentationAgent    DEBUG
Registered MBean with objectname:
org.apache.camel:context=dell-charles/camel,type=consumers,name=EventConsumer(0x1353249)
[                          main] DefaultComponent               DEBUG
Creating endpoint uri=[event:default], path=[default], parameters=[{}]
[                          main] DefaultCamelContext            DEBUG
event:default converted to endpoint: Endpoint[event:default] by component:
org.apache.camel.component.event.EventComponent@19fe451
[                          main] DefaultInstrumentationAgent    DEBUG
Registered MBean with objectname:
org.apache.camel:context=dell-charles/camel,type=endpoints,name="event:default\?id=0x1c3b4b06"
[                          main] ProducerCache                  DEBUG >>>>
Endpoint[event://default] Exchange[Message: Hello there!]
[                          main] ResolverUtil                   DEBUG
Searching for annotations of org.apache.camel.Converter in packages:
[org.apache.camel.converter, org.apache.camel.component.cxf.converter,
org.apache.camel.spring.converter]
[                          main] ResolverUtil                   DEBUG Using
only regular classloaders
[                          main] ResolverUtil                   DEBUG
Loading from jar:
C:\.m2\repository\org\apache\camel\camel-core\1.5-SNAPSHOT\camel-core-1.5-SNAPSHOT.jar
[                          main] ResolverUtil                   DEBUG Using
only regular classloaders
[                          main] ResolverUtil                   DEBUG
Loading from jar:
C:\.m2\repository\org\apache\camel\camel-cxf\1.5-SNAPSHOT\camel-cxf-1.5-SNAPSHOT.jar
[                          main] ResolverUtil                   DEBUG Using
only regular classloaders
[                          main] ResolverUtil                   DEBUG Found:
[class org.apache.camel.component.cxf.converter.CxfConverter, class
org.apache.camel.converter.CollectionConverter, class
org.apache.camel.converter.jaxp.StreamSourceConverter, class
org.apache.camel.converter.NIOConverter, class
org.apache.camel.converter.stream.StreamCacheConverter, class
org.apache.camel.converter.jaxp.XmlConverter, class
org.apache.camel.converter.CamelConverter, class
org.apache.camel.converter.IOConverter, class
org.apache.camel.converter.jaxp.DomConverter, class
org.apache.camel.converter.ObjectConverter, class
org.apache.camel.converter.jaxp.StaxConverter]
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class:
org.apache.camel.component.cxf.converter.CxfConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class: org.apache.camel.converter.CollectionConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class:
org.apache.camel.converter.jaxp.StreamSourceConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class: org.apache.camel.converter.NIOConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class:
org.apache.camel.converter.stream.StreamCacheConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class: org.apache.camel.converter.jaxp.XmlConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class: org.apache.camel.converter.CamelConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class: org.apache.camel.converter.IOConverter
[                          main] DefaultTypeConverter           WARN 
Overriding type converter from: InstanceMethodTypeConverter: public
java.lang.String
org.apache.camel.converter.jaxp.XmlConverter.toString(javax.xml.transform.Source)
throws javax.xml.transform.TransformerException to:
StaticMethodTypeConverter: public static java.lang.String
org.apache.camel.converter.IOConverter.toString(javax.xml.transform.Source)
throws javax.xml.transform.TransformerException,java.io.IOException
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class: org.apache.camel.converter.jaxp.DomConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class: org.apache.camel.converter.ObjectConverter
[                          main] AnnotationTypeConverterLoader  DEBUG
Loading converter class: org.apache.camel.converter.jaxp.StaxConverter
[                          main] SpringCamelContext             DEBUG
Publishing event:
org.apache.camel.component.event.CamelEvent[source=Endpoint[event://default]]


KR,

Charles Moulliard

-----
Enterprise Architect

Xpectis
12, route d'Esch
L-1470 Luxembourg

Phone +352 25 10 70 470
Mobile +352 621 45 36 22

e-mail : cmoulliard@xpectis.com
web site :  www.xpectis.com www.xpectis.com 
My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/Is-the-tracing-working-with-spring-event---tp20030777s22882p20030777.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message