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: Tracer set to WARN breaks app
Date Tue, 09 Aug 2011 13:22:42 GMT
On Tue, Aug 9, 2011 at 3:18 PM, Mirko Caserta <mirko.caserta@gmail.com> wrote:
> Hi Freeman,
> your gut feeling was right :)
>
> Thanks a lot. You guys rock!
>

Camel 2.8 onwards will not touch stream messages by the tracer by default.

The tracer will use same logic as the log component. However there are
options to turn on tracing/logging stream messages as well.
http://camel.apache.org/camel-280-release.html

And you can read about stream caching here
http://camel.apache.org/stream-caching

> Mirko
>
> On Tue, Aug 9, 2011 at 3:00 PM, Freeman Fang <freeman.fang@gmail.com> wrote:
>> Hi,
>>
>> My gut feeling is that the input stream was consumed differently with
>> different log levels.
>> You may need add streamCaching="true" to your router DSL.
>>
>> Freeman
>> On 2011-8-9, at 下午8:43, Mirko Caserta wrote:
>>
>>> Hi there,
>>> I have a weird issue regarding the Tracer.
>>>
>>> The problem my client is reporting is that switching the logger on
>>> "org.apache.camel.processor.interceptor.Tracer" from INFO to WARN
>>> breaks the application. I know it sounds weird but I've been able to
>>> reproduce the issue in my environment.
>>>
>>> I am using camel 2.7.2 but some preliminary tests with 2.8.0 show no
>>> difference.
>>>
>>> Also, I'm using slf4j-api and logback-classic for logging.
>>>
>>> The problem manifests itself in a route where I'm getting an xml
>>> response message from an http client component, then pass it to a
>>> Smooks processor. When "org.apache.camel.processor.interceptor.Tracer"
>>> is set to WARN, it looks like the message has disappeared between the
>>> http client and the Smooks processor (which complains with a
>>> "Premature EOF" exception).
>>>
>>> I also see that, when the route is working, the message body is an
>>> instance of
>>> org.apache.camel.converter.stream.CachedOutputStream.WrappedInputStream
>>> right after the http client component, then suddenly becomes an
>>> org.apache.camel.converter.stream.InputStreamCache.
>>>
>>> The obvious workaround so far is to tell my client to set
>>> org.apache.camel.processor.interceptor.Tracer on INFO, but they
>>> complain that logs are too verbose and would prefer to set the tracer
>>> to ERROR.
>>>
>>> I can share my route config and/or code if you think it would help.
>>>
>>> Thanks, Mirko.
>>
>> ---------------------------------------------
>> Freeman Fang
>>
>> FuseSource
>> Email:ffang@fusesource.com
>> Web: fusesource.com
>> Twitter: freemanfang
>> Blog: http://freemanfang.blogspot.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message