See ticket
https://issues.apache.org/activemq/browse/CAMEL-1836

There is a new option on log component
http://cwiki.apache.org/confluence/display/CAMEL/Log

On Thu, Jul 16, 2009 at 1:08 PM, Charles Moulliard<cmoulli...@gmail.com> wrote:
> OK.
>
> If the purpose of the log component is to not showing the stacktrace in the
> log file. How can I achieve this in the following route ?
>
>        <camel:route errorHandlerRef="txErrorHandler">
>            <camel:from ref="queueRequestEndpoint" />
>            <camel:transacted ref="PROPAGATION_REQUIRED" />
>
>            <camel:doTry>
>
>                <camel:convertBodyTo
> type="com.xpectis.x3s.platform.model.Request" />
>
>                <!-- Parse the request -->
>                <camel:bean ref="serviceHelper" method="parseRequest" />
>
>                <!-- Update request status -->
>                <camel:bean ref="serviceHelper"
> method="updateRequestStatus"/>
>
>                <!-- Put request in the queue -->
>                <camel:to ref="directRequestMessageEndpoint" />
>
>                <camel:doCatch>
>
> <camel:exception>com.xpectis.x3s.exception.X3SClientException</camel:exception>
>                    <camel:bean ref="serviceHelper"
> method="processException" />
>                    <camel:to ref="queueReportingEndpoint" />
>                </camel:doCatch>
>
>                <camel:doCatch>
>                    <camel:exception>java.lang.Exception</camel:exception>
>                     <!-- <camel:to
> uri="log:x3slog?level=INFO&amp;multiline=false&amp;showException=false"
> /> -->
>                    <camel:rollback/>
>                </camel:doCatch>
>
>            </camel:doTry>
>
>        </camel:route>
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>
>
> On Wed, Jul 15, 2009 at 3:51 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:
>
>> Its the TRACER that you have in the displayed log.
>>
>> the LOG component is not the tracer. You have configured it to log at
>> DEBUG level maybe try raising that to INFO/ERROR or whatever.
>> In case DEBUG logging is not enabled.
>>
>>
>>
>> On Wed, Jul 15, 2009 at 3:49 PM, Charles Moulliard<cmoulli...@gmail.com>
>> wrote:
>> > Nothing change if I use this uri
>> >
>> > log:x3slog?level=DEBUG&amp;multiline=true&amp;showException=true
>> >
>> > BTW, in the doc, showException is defined by default to false --> so :no
>> > stack trace is show
>> >
>> >
>> >
>> >
>> > or this
>> >
>> > log:x3slog?level=DEBUG&amp;multiline=true&amp;showAll=true
>> >
>> > 15:46:22,406 | INFO  | enerContainer-22 | TraceInterceptor
>>   |
>> > rg.apache.camel.processor.Logger  166 |
>> > ID:dell-charles-3698-1247659477812-3:12:1:1:1 >>> *[class
>> > java.lang.Exception] --> [class java.lang.Exception]*, Pattern:InOnly,
>> > Headers:{CamelFileNameOnly=OINP-dummy.txt, JMSCorrelationID=null,
>> > JMSMessageID=ID:dell-charles-3698-1247659477812-3:12:1:1:1,
>> > CamelFileAbsolutePath=d:\temp\data\oinp\OINP-dummy.txt,
>> JMSDeliveryMode=2,
>> > CamelBeanMultiParameterArray=false, CamelRedelivered=false,
>> > CamelBeanMethodName=null, JMSReplyTo=null, JMSTimestamp=1247665582015,
>> > JMSDestination=queue://x3s:request, JMSType=null, JMSRedelivered=false,
>> > CamelFileLength=332, CamelFileAbsolute=true, CamelFileLastModified=Tue
>> Jun
>> > 16 14:50:55 CEST 2009, JMSExpiration=0,
>> > CamelFileRelativePath=d:\temp\data\oinp\OINP-dummy.txt, origin=file,
>> > JMSPriority=4, messageType=OINP, JMSXGroupID=null,
>> > CamelFileName=OINP-dummy.txt,
>> > CamelFilePath=d:\temp\data\oinp\OINP-dummy.txt,
>> > CamelFileParent=d:\temp\data\oinp, CamelRedeliveryCounter=0},
>> > BodyType:java.util.ArrayList,
>> >
>> Body:[{com.xpectis.x3s.model.backoffice.emx.oinp.in.inoinpmessage=com.xpectis.x3s.model.backoffice.emx.oinp.in.inoinpmess...@12923c6
>> > [
>> >  providerId=11111
>> >  originatorId=22222
>> >  senderCompanyId=33333
>> >  agencyId=AGENCY23
>> >  dealCurrencyCode=EUR
>> >  targetCompanyId=44444
>> >  productType=PRODUCT2
>> >  fundIdType=4
>> >  fundId=LU1234567890
>> >  movementType=1
>> >  originalSendTime=Mon Jan 07 14:02:09 CET 2008
>> >  orderUnits=10
>> >  orderCashAmount=1287.44
>> >  messageType=<null>
>> >
>> >
>> > Charles Moulliard
>> > Senior Enterprise Architect
>> > Apache Camel Committer
>> >
>> > *****************************
>> > blog : http://cmoulliard.blogspot.com
>> >
>> >
>> > On Wed, Jul 15, 2009 at 3:39 PM, Charles Moulliard <cmoulli...@gmail.com
>> >wrote:
>> >
>> >> Sorry for my mistake master Claus ;-)
>> >>
>> >> Charles Moulliard
>> >> Senior Enterprise Architect
>> >> Apache Camel Committer
>> >>
>> >> *****************************
>> >> blog : http://cmoulliard.blogspot.com
>> >>
>> >>
>> >> On Wed, Jul 15, 2009 at 3:35 PM, Claus Ibsen <claus.ib...@gmail.com
>> >wrote:
>> >>
>> >>> A good idea is to read the manual / log component :)
>> >>> http://camel.apache.org/log.html
>> >>>
>> >>> The option: showException should be set to true
>> >>>
>> >>> BTW: I would like to add an additonal option in the future:
>> >>> showTrackTrace to eg not output exception stacktrace, but still the
>> >>> exception message and exception class type can be logged. A stacktrace
>> >>> can be very verbose.
>> >>>
>> >>>
>> >>> On Wed, Jul 15, 2009 at 3:25 PM, Charles Moulliard<
>> cmoulli...@gmail.com>
>> >>> wrote:
>> >>> > Hi,
>> >>> >
>> >>> > In my route, I use the camel logger processor to log some info in a
>> >>> file. I
>> >>> > have configured it to display error on multilines
>> >>> >
>> >>> >        <camel:route errorHandlerRef="txErrorHandler">
>> >>> >            <camel:from ref="queueRequestEndpoint" />
>> >>> >            <camel:transacted ref="PROPAGATION_REQUIRED" />
>> >>> >
>> >>> >            <camel:doTry>
>> >>> >
>> >>> >                <camel:convertBodyTo
>> >>> > type="com.xpectis.x3s.platform.model.Request" />
>> >>> >
>> >>> >                <!-- Parse the request -->
>> >>> >                <camel:bean ref="serviceHelper" method="parseRequest"
>> />
>> >>> >
>> >>> >                <!-- Update request status -->
>> >>> >                <camel:bean ref="serviceHelper"
>> >>> > method="updateRequestStatus"/>
>> >>> >
>> >>> >                <!-- Put request in the queue -->
>> >>> >                <camel:to ref="directRequestMessageEndpoint" />
>> >>> >
>> >>> >                <camel:doCatch>
>> >>> >
>> >>> >
>> >>>
>> <camel:exception>com.xpectis.x3s.exception.X3SClientException</camel:exception>
>> >>> >                    <camel:bean ref="serviceHelper"
>> >>> > method="processException" />
>> >>> >                    <camel:to ref="queueReportingEndpoint" />
>> >>> >                </camel:doCatch>
>> >>> >
>> >>> >                <camel:doCatch>
>> >>> >
>> >>>  <camel:exception>java.lang.Exception</camel:exception>
>> >>> >                    <camel:to
>> >>> > uri="log:x3slog?level=DEBUG&amp;multiline=true" />
>> >>> >                    <camel:rollback/>
>> >>> >                </camel:doCatch>
>> >>> >
>> >>> >            </camel:doTry>
>> >>> >
>> >>> >        </camel:route>
>> >>> >
>> >>> > but I only see one line like here :
>> >>> >
>> >>> > 15:16:36,328 | INFO  | erContainer-1657 | TraceInterceptor
>> >>>   |
>> >>> > rg.apache.camel.processor.Logger   88 |
>> >>> > ID-dell-charles-3769-1247659499875-0-12 >>> *[class
>> java.lang.Exception]
>> >>> -->
>> >>> > [class java.lang.Exception]*, Pattern:InOnly,
>> >>> > Headers:{CamelFileNameOnly=OINP-dummy.txt, JMSCorrelationID=null,
>> >>> > JMSMessageID=ID:dell-charles-3698-1247659477812-3:20:1:1:1,
>> >>> > CamelFileAbsolutePath=d:\temp\data\oinp\OINP-dummy.txt,
>> >>> JMSDeliveryMode=2,
>> >>> > CamelBeanMultiParameterArray=false, CamelBeanMethodName=null,
>> >>> > JMSTimestamp=1247663796078, JMSReplyTo=null,
>> >>> > JMSDestination=queue://x3s:request, JMSType=null,
>> JMSRedelivered=false,
>> >>> > CamelFileLength=332, CamelFileAbsolute=true,
>> >>> > CamelFileRelativePath=d:\temp\data\oinp\OINP-dummy.txt,
>> JMSExpiration=0,
>> >>> > CamelFileLastModified=Tue Jun 16 14:50:55 CEST 2009, origin=file,
>> >>> > JMSPriority=4, messageType=OINP, JMSXGroupID=null,
>> >>> > CamelFileName=OINP-dummy.txt,
>> >>> > CamelFilePath=d:\temp\data\oinp\OINP-dummy.txt,
>> >>> > CamelFileParent=d:\temp\data\oinp}, BodyType:java.util.ArrayList,
>> >>> >
>> >>>
>> Body:[{com.xpectis.x3s.model.backoffice.emx.oinp.in.inoinpmessage=com.xpectis.x3s.model.backoffice.emx.oinp.in.inoinpmess...@1de2bea
>> >>> > [
>> >>> >  providerId=11111
>> >>> >  originatorId=22222
>> >>> >  senderCompanyId=33333
>> >>> >  agencyId=AGENCY23
>> >>> >  dealCurrencyCode=EUR
>> >>> >  targetCompanyId=44444
>> >>> >  productType=PRODUCT2
>> >>> >  fundIdType=4
>> >>> >  fundId=LU1234567890
>> >>> >  movementType=1
>> >>> >  originalSendTime=Mon Jan 07 14:02:09 CET 2008
>> >>> >  orderUnits=10
>> >>> >  orderCashAmount=1287.44
>> >>> >  messageType=<null>
>> >>> > ]},
>> >>> >
>> >>> > How can I see all the stack trace of the error ?
>> >>> >
>> >>> > Regards,
>> >>> >
>> >>> > Charles Moulliard
>> >>> > Senior Enterprise Architect
>> >>> > Apache Camel Committer
>> >>> >
>> >>> > *****************************
>> >>> > blog : http://cmoulliard.blogspot.com
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Claus Ibsen
>> >>> Apache Camel Committer
>> >>>
>> >>> Open Source Integration: http://fusesource.com
>> >>> Blog: http://davsclaus.blogspot.com/
>> >>> Twitter: http://twitter.com/davsclaus
>> >>>
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to