Camel uses SLF4J internally for logging. Just download an SLF4j to LOG4J
Bridge Jar and put it in the class path and you should be in business.

RE: http://www.slf4j.org/legacy.html

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Tue, Feb 25, 2014 at 7:20 AM, SpongeBobSquarePants <
[email protected]> wrote:

> Hi,
>
> I am using Camel 2.12.2 and I have been able to setup my routes and they
> are
> working fine, however I am not able to redirect any of the logs from camel
> or my application into log files. This is how my log4j.properties looks
> like:
>
> log4j.rootLogger=DEBUG, FILE
> log4j.logger.org.apache.camel=DEBUG, FILE
> log4j.logger.org.springframework=DEBUG, FILE
> log4j.appender.FILE=org.apache.log4j.RollingFileAppender
> log4j.appender.FILE.MaxFileSize=15MB
> log4j.appender.FILE.MaxBackupIndex=100
> log4j.appender.FILE.File=C:/applogs/log.log
> log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
> log4j.appender.FILE.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1}
> - %m%n
>
> I am using spring to startup my camel context. I use maven and have tried
> including the following slf4j  dependency version 1.7.5/1.6.1/1.6.6 but to
> no avail .
>
> I looked at the following post regarding the same issue, but the solution
> suggested there did not help.
> http://camel.465427.n5.nabble.com/Using-Camel-with-log4j-xml-td4617036.html
>
>
> Any pointers to get this working is very much appreciated.
>
> Thanks in advance,
>
> SpongeBobSquarePants
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-logging-with-log4j-properties-not-working-tp5747936.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to