Child pages
  • How do I use log4j
Skip to end of metadata
Go to start of metadata

How do I use Log4j?

Camel uses sfl4j which allows you to configure logging via, among others:

The quick way to enable Log4j is to add log4j to your classpath or maven pom.xml. For example the following in your pom.xml should do the trick


Then to configure log4j you need to add a or log4j.xml to your classpath (so they go in a directory which is on your classpath).

Here's an example file

log4j.rootLogger=INFO, out

# uncomment the following line to enable debugging of Camel

log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
  • No labels