You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by go...@icloud.com on 2018/04/10 06:42:04 UTC

Logging in Apache camel

Hello everyone, 




So we have multiple camel routes that are configured by logback to log into separate log files. Is there a way to specify a logger into the route itself? The reason I ask is because, when switched to debug, everything other than what we explicitly log from our logger seems to go to the generic log. We'd like to instruct camel to log everything related to a route in to the particular log itself. 




Thanks. 






Re: Logging in Apache camel

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Apr 13, 2018 at 9:23 AM,  <go...@icloud.com> wrote:
> Hi Claus,
>
>
>
>
> Thanks. Was able to get it to work. Besides just noticed something.
>
>
>
>
> On an exchange with no out, initially exchange.hasOut() returns false.
>
>
> But if I just call exchange.getOut() and exchange.hasOut() becomes true and causes issues. Is this expected?
>

Yes read the javadoc of these methods, and see the FAQ:
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

>
>
>
> Get Outlook for Android
>
>
>
>
>
>
>
> On Tue, Apr 10, 2018 at 2:46 PM +0800, "Claus Ibsen" <cl...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>
> Hi
>
> You can take a look at MDC logging
> http://camel.apache.org/mdc-logging
>
> On Tue, Apr 10, 2018 at 8:42 AM,   wrote:
>> Hello everyone,
>>
>>
>>
>>
>> So we have multiple camel routes that are configured by logback to log into separate log files. Is there a way to specify a logger into the route itself? The reason I ask is because, when switched to debug, everything other than what we explicitly log from our logger seems to go to the generic log. We'd like to instruct camel to log everything related to a route in to the particular log itself.
>>
>>
>>
>>
>> Thanks.
>>
>>
>>
>>
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
>
>
>
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Logging in Apache camel

Posted by go...@icloud.com.
Hi Claus, 




Thanks. Was able to get it to work. Besides just noticed something. 




On an exchange with no out, initially exchange.hasOut() returns false. 


But if I just call exchange.getOut() and exchange.hasOut() becomes true and causes issues. Is this expected? 




Get Outlook for Android







On Tue, Apr 10, 2018 at 2:46 PM +0800, "Claus Ibsen" <cl...@gmail.com> wrote:










Hi

You can take a look at MDC logging
http://camel.apache.org/mdc-logging

On Tue, Apr 10, 2018 at 8:42 AM,   wrote:
> Hello everyone,
>
>
>
>
> So we have multiple camel routes that are configured by logback to log into separate log files. Is there a way to specify a logger into the route itself? The reason I ask is because, when switched to debug, everything other than what we explicitly log from our logger seems to go to the generic log. We'd like to instruct camel to log everything related to a route in to the particular log itself.
>
>
>
>
> Thanks.
>
>
>
>
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2






Re: Logging in Apache camel

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can take a look at MDC logging
http://camel.apache.org/mdc-logging

On Tue, Apr 10, 2018 at 8:42 AM,  <go...@icloud.com> wrote:
> Hello everyone,
>
>
>
>
> So we have multiple camel routes that are configured by logback to log into separate log files. Is there a way to specify a logger into the route itself? The reason I ask is because, when switched to debug, everything other than what we explicitly log from our logger seems to go to the generic log. We'd like to instruct camel to log everything related to a route in to the particular log itself.
>
>
>
>
> Thanks.
>
>
>
>
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2