camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: camel route logging
Date Thu, 13 May 2010 16:41:43 GMT
On Thu, May 13, 2010 at 5:14 PM, usha Kanteti <u_kanteti@yahoo.com> wrote:
>
> I included the dependencies for log4j in my pom file
>
> <dependency>
>              <groupId>commons-logging</groupId>
>              <artifactId>commons-logging</artifactId>
>              <version>1.1</version>
>            </dependency>
>                <dependency>
>                        <groupId>log4j</groupId>
>                        <artifactId>log4j</artifactId>
>                        <version>1.2.13</version>
>                </dependency>
>
> and I use the following log4j.properties
>
> log4j.rootLogger=INFO, out
>
> log4j.logger.org.apache.camel=DEBUG,ERROR
>
> log4j.appender.out=org.apache.log4j.ConsoleAppender
> log4j.appender.out.layout=org.apache.log4j.PatternLayout
> log4j.appender.out.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
> #log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1}
> - %m%n
>
>
> # Pattern to output the caller's file name and line number.
> log4j.appender.stdout.layout.ConversionPattern =%d{ABSOLUTE} %5p %c{1}:%L -
> %m%n
> log4j.appender.R = org.apache.log4j.RollingFileAppender
> log4j.appender.R.File = my_log.log
> log4j.appender.R.MaxFileSize = 100KB
>
>
> with this configuration, I see my logging statements from java code are
> getting into the log file but not any errors from camel (routing process).
>
> I am getting some errors in camel routing process,these errors also should
> go into the log file.
> how can we do that.

I think in Camel 2.3/2.2 onwards we let Camel log at ERROR level when
an exception occurred.
You can control the logging on the RedeliveryPolicy/ErrorHandler as it
have options to set
- logging level
- whether to log stacktraces
- and how much to log etc.

You can enable this for 2.2/2.1 or older. so it should logs any thrown
exception at ERROR level.

What version of Camel are you using?


>
> Thanks.
>
> --
> View this message in context: http://old.nabble.com/camel-route--logging-tp28548848p28548848.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message