Hi You dont need the pattern attribute at all. Camel will figure it out for you as its a logger so it only logs the message.
On Thu, Feb 9, 2012 at 12:38 PM, David Delbecq <de...@meteo.be> wrote: > Hello, > > i am trying to run a simple example where i generate a text message and try > to store it in a file. Here is my spring config file (i tried both with this > logger and with file:///D:/blabla ) > > > > <camel:camelContext id="mycamel" autoStartup="true"> > <camel:endpoint id="test" uri="log:org.apache.camel.example?level=ERROR" > pattern="OutOnly"/> > </camel:camelContext> > <bean class="mypackage.TransfertJob" > p:location="0414475060_{0,date,ddMMyy}_v1.csv" p:destination-ref="test"/> > > The job code: > > try { > ProducerTemplate template = camelContext.createProducerTemplate(); > template.sendBodyAndHeader(destination,"Hello", Exchange.FILE_NAME, > MessageFormat.format(location,new Date())); > System.out.println("Current folder is "+new File(".").getCanonicalPath()); > } catch (Exception e) { > log.error("Could not send file",e); > } > > and the test code: > GenericXmlApplicationContext ctx = new > GenericXmlApplicationContext("classpath:/springtest.xml"); > TransfertJob job = ctx.getBean(TransfertJob.class); > job.execute(); > > However, i do not get neither the log message nor the output file. I get no > exception what so ever and the println show me correct informations. What did > i miss? > > David Delbecq > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/