On Wed, Jul 20, 2011 at 9:33 PM, misterbayne <[email protected]> wrote: > I am brand new to Camel and I am just starting to get my feet wet with all > that it does. The first thing I noticed once I got a route working, was > that the logging was not going to my log file. In fact, it is not following > any of the appenders I have setup in my log4j.xml file. I am using Spring > to start my application and I have a camelContext in my Spring > application-context.xml file. The log4j file has a logger for Camel: > > <logger name="org.apache.camel"> > <level value="INFO" /> > </logger> > > but the output from Camel remains as the default logging style: > > 5559 [Camel (camel-1) thread #0 - ..........] > > I know this has to be trivial but I cannot get these log messages into the > log file or in the application specific format. Any help with this is > GREATLY appreciated! >
What version of Camel are you using? I assume one of the 2.7 releases. To use log4j you need to include the following JAR org.slf4j:slf4j-log4j12:jar:1.6.1 It should be in the lib/optional directory of the distribution. If you use maven you need to add the above as a dependency. > Also, I noticed in my sftp route, Camel displays the username and password > in the log messages. I figured that once I successfully got log4j working, > I would set the level to be WARN and this would not be an issue but I have > been wondering if there was a way to disable or limit all of the logging > from SftpOperations and/or RemoteFileProducer. > > Thanks in advance for any assistance. > > Jeff > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Using-Camel-with-log4j-xml-tp4617036p4617036.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
