camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Using Camel with log4j.xml
Date Thu, 21 Jul 2011 06:26:11 GMT
On Wed, Jul 20, 2011 at 9:33 PM, misterbayne <> 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

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:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message