camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From usha Kanteti <u_kant...@yahoo.com>
Subject Re: camel route logging
Date Fri, 14 May 2010 13:00:24 GMT

HI 
  As suggested in the URL
http://camel.apache.org/maven/camel-2.2.0/camel-core/apidocs/org/apache/camel/processor/RedeliveryPolicy.html

I am trying to set 

logStackTrace  and  retryAttemptedLogLevel

in the following code

<onException useOriginalMessage="true">
      		<exception> java.net.ConnectException</exception>
      		  <redeliveryPolicy maximumRedeliveries="-1"  logStackTrace = "true"    
retryAttemptedLogLevel="LoggingLevel.ERROR"  />
      		<handled><constant>true</constant></handled>
  		</onException> 
  		
I am getting the following build error 
cvc-enumeration-valid: Value 'LoggingLevel.ERROR' is not facet-valid with
respect to enumeration '[DEBUG, ERROR, FATAL, INFO, TRACE, WARN, OFF]'. It
must be a value from the enumeration.

I tried LoggingLevel.DEBUG and LoggingLevel.WARN also.

I am getting the same error message.

Please advise.

Thanks.

Claus Ibsen-2 wrote:
> 
> Hi
> 
> See the RedeliveryPolicy
> http://camel.apache.org/maven/camel-2.2.0/camel-core/apidocs/org/apache/camel/processor/RedeliveryPolicy.html
> 
> 
> On Thu, May 13, 2010 at 7:53 PM, usha Kanteti <u_kanteti@yahoo.com> wrote:
>>
>> 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.
>>
>>
> 
> 
> 
> -- 
> 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
> 
> 

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


Mime
View raw message