You have traceOutExchanges=true which will log 2x, eg before (IN) and after (OUT) each process in the routes. Maybe its that what is confusing you.
On Mon, Jun 6, 2016 at 10:30 PM, Evguenia Krylova <[email protected]> wrote: > I see double entries in the log from the Tracer but can’t figure out why. > > [INFO ] org.springframework.context.support.ClassPathXmlApplicationContext - > 0 [main] - Refreshing > org.springframework.context.support.ClassPathXmlApplicationContext@3419866c: > startup date [Mon Jun 06 15:26:12 CDT 2016]; root of context hierarchy [INFO > ] org.springframework.beans.factory.xml.XmlBeanDefinitionReader - 98 [main] - > Loading XML bean definitions from class path resource > [META-INF/spring/copy-file-test.xml] [INFO ] CopyFileTracer - 4711 [Camel > (copy-test-context) thread #0 - file://test/in] - > ID-Evguenias-MacBook-Pro-local-52979-1465244774902-0-2 >>> (copy-test-route) > from(file://test/in?noop=true) --> file://test/out <<< Pattern:InOnly, > Headers:{breadcrumbId=ID-Evguenias-MacBook-Pro-local-52979-1465244774902-0-1, > CamelFileAbsolute=false, > CamelFileAbsolutePath=/Users/ekrylova/sdg_projects/fedora-jms-monitor/test/in/add_datastream_hasModel_hasDatastream.xml, > CamelFileLastModified=1461007724000, CamelFileLength=1842, > CamelFileName=add_datastream_hasModel_hasDatastream.xml, > CamelFileNameConsumed=add_datastream_hasModel_hasDatastream.xml, > CamelFileNameOnly=add_datastream_hasModel_hasDatastream.xml, > CamelFileParent=test/in, > CamelFilePath=test/in/add_datastream_hasModel_hasDatastream.xml, > CamelFileRelativePath=add_datastream_hasModel_hasDatastream.xml}, > BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is file > based: GenericFile[add_datastream_hasModel_hasDatastream.xml]] [INFO ] > CopyFileTracer - 4723 [Camel (copy-test-context) thread #0 - file://test/in] > - ID-Evguenias-MacBook-Pro-local-52979-1465244774902-0-2 >>> > (copy-test-route) from(file://test/in?noop=true) --> file://test/out <<< > Pattern:InOnly, > Headers:{breadcrumbId=ID-Evguenias-MacBook-Pro-local-52979-1465244774902-0-1, > CamelFileAbsolute=false, > CamelFileAbsolutePath=/Users/ekrylova/sdg_projects/fedora-jms-monitor/test/in/add_datastream_hasModel_hasDatastream.xml, > CamelFileLastModified=1461007724000, CamelFileLength=1842, > CamelFileName=add_datastream_hasModel_hasDatastream.xml, > CamelFileNameConsumed=add_datastream_hasModel_hasDatastream.xml, > CamelFileNameOnly=add_datastream_hasModel_hasDatastream.xml, > CamelFileNameProduced=test/out/add_datastream_hasModel_hasDatastream.xml, > CamelFileParent=test/in, > CamelFilePath=test/in/add_datastream_hasModel_hasDatastream.xml, > CamelFileRelativePath=add_datastream_hasModel_hasDatastream.xml}, > BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is file > based: GenericFile[add_datastream_hasModel_hasDatastream.xml]] [INFO ] > CopyFileTracer - 4725 [Camel (copy-test-context) thread #0 - file://test/in] > - ID-Evguenias-MacBook-Pro-local-52979-1465244774902-0-4 >>> > (copy-test-route) from(file://test/in?noop=true) --> file://test/out <<< > Pattern:InOnly, > Headers:{breadcrumbId=ID-Evguenias-MacBook-Pro-local-52979-1465244774902-0-3, > CamelFileAbsolute=false, > CamelFileAbsolutePath=/Users/ekrylova/sdg_projects/fedora-jms-monitor/test/in/test_copy.txt, > CamelFileLastModified=1465243275000, CamelFileLength=9, > CamelFileName=test_copy.txt, CamelFileNameConsumed=test_copy.txt, > CamelFileNameOnly=test_copy.txt, CamelFileParent=test/in, > CamelFilePath=test/in/test_copy.txt, CamelFileRelativePath=test_copy.txt}, > BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is file > based: GenericFile[test_copy.txt]] [INFO ] CopyFileTracer - 4726 [Camel > (copy-test-context) thread #0 - file://test/in] - > ID-Evguenias-MacBook-Pro-local-52979-1465244774902-0-4 >>> (copy-test-route) > from(file://test/in?noop=true) --> file://test/out <<< Pattern:InOnly, > Headers:{breadcrumbId=ID-Evguenias-MacBook-Pro-local-52979-1465244774902-0-3, > CamelFileAbsolute=false, > CamelFileAbsolutePath=/Users/ekrylova/sdg_projects/fedora-jms-monitor/test/in/test_copy.txt, > CamelFileLastModified=1465243275000, CamelFileLength=9, > CamelFileName=test_copy.txt, CamelFileNameConsumed=test_copy.txt, > CamelFileNameOnly=test_copy.txt, > CamelFileNameProduced=test/out/test_copy.txt, CamelFileParent=test/in, > CamelFilePath=test/in/test_copy.txt, CamelFileRelativePath=test_copy.txt}, > BodyType:org.apache.camel.component.file.GenericFile, Body:[Body is file > based: GenericFile[test_copy.txt]] [INFO ] > org.springframework.context.support.ClassPathXmlApplicationContext - 13695 > [main] - Closing > org.springframework.context.support.ClassPathXmlApplicationContext@3419866c: > startup date [Mon Jun 06 15:26:12 CDT 2016]; root of context hierarchy > > > Here’s Camel context configuration file and the Java class that runs the > route. > > > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:fedora-types="http://www.fedora.info/definitions/1/0/types/" > xsi:schemaLocation=" > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd"> > > <bean id="camelTracer" > class="org.apache.camel.processor.interceptor.Tracer"> > <property name="traceOutExchanges" value="true" /> > <property name="logName" value="CopyFileTracer" /> > </bean> > > <camelContext id="copy-test-context" > xmlns="http://camel.apache.org/schema/spring"> > <jmxAgent id="agent" disabled="false"/> > <route id="copy-test-route" trace="true"> > <from uri="file:test/in?noop=true"/> > <to uri="file:test/out"/> > </route> > </camelContext> > > </beans> > > > public class TestRouteRunner { > > public static void main(String[] args) throws Exception { > Main main = new Main(); > main.setApplicationContextUri("META-INF/spring/copy-file-test.xml"); > main.start(); > Thread.sleep(10000); > main.stop(); > > } > > } > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
