I use camel 2.2

I need the exception errors to go the log file that I specified in
log4j.properties file
so how and where I have to specify logStackTrace and  log level 

I have the following route defined

<camelContext xmlns="http://camel.apache.org/schema/spring";>

<onException useOriginalMessage="true">
           <exception> java.net.ConnectException</exception>
           <exception> our User defined excetion </exception>
           <redeliveryPolicy maximumRedeliveries="-1" />
           <handled><constant>true</constant></handled>
</onException> 

<route  >
                         <from uri="" /> 
                         <bean ref="handleMessage" method="processIncoming"/> 
                         <to   uri="cxf:bean:...." /> 
</route>

</camelContext >




usha Kanteti 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.
> 
> Thanks.
> 
> 

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

Reply via email to