You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mckinnonrob <ro...@gmail.com> on 2013/12/01 18:04:57 UTC

Re: DSL Logging not outputting to the logs

Claus Ibsen-2 wrote
> Are you sure the route pickup any messages to route? The log DSL will
> only log if there is messages.

Yes I am sure. In my route the body is ultimately being placed on a queue,
CAMEL_FINAL, and all the messages are showing up there fine.



--
View this message in context: http://camel.465427.n5.nabble.com/DSL-Logging-not-outputting-to-the-logs-tp5744093p5744137.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DSL Logging not outputting to the logs

Posted by mckinnonrob <ro...@gmail.com>.
Raul Kripalani wrote
> Are you getting any other log statements printed out to your 'out' console
> appender?

Yes. I am seeing all the log chatter. Just not seeing logs from the route.



--
View this message in context: http://camel.465427.n5.nabble.com/DSL-Logging-not-outputting-to-the-logs-tp5744093p5744341.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DSL Logging not outputting to the logs

Posted by Raul Kripalani <ra...@evosent.com>.
Are you getting any other log statements printed out to your 'out' console
appender?

Given that you've set the root log level to DEBUG in your log4j
configuration, you should be seeing a lot of log noise from Camel.

If you don't, your container may not be picking up your log4j configuration
file.

Regards,

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist | http://about.me/raulkripalani |
http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Sun, Dec 1, 2013 at 5:04 PM, mckinnonrob <ro...@gmail.com> wrote:

> Claus Ibsen-2 wrote
> > Are you sure the route pickup any messages to route? The log DSL will
> > only log if there is messages.
>
> Yes I am sure. In my route the body is ultimately being placed on a queue,
> CAMEL_FINAL, and all the messages are showing up there fine.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/DSL-Logging-not-outputting-to-the-logs-tp5744093p5744137.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: DSL Logging not outputting to the logs

Posted by mckinnonrob <ro...@gmail.com>.
Claus Ibsen-2 wrote
> The log uses the route name as the logger name by default.
> 
> You can try to specify a logger name to use with the 3 args version
>     public Type log(LoggingLevel loggingLevel, String logName, String
> message) {

I specified the three args version with the following:
from("jms:queue:CAMEL_IN").to("multiplier").*log(LoggingLevel.ERROR,
"com.test.Foo", "this is a test ${body}")*.to("jms:queue:CAMEL_OUT");

Still not seeing the log statement from the route however the following logs
are being produced:

2013-12-04 20:40:36 DEBUG
org.apache.camel.component.jms.DefaultJmsMessageListenerContainer:313 -
Received message of type [class
org.apache.activemq.command.ActiveMQTextMessage] from consumer
[PooledMessageConsumer { ActiveMQMessageConsumer {
value=ID:robs-MacBook-Pro.local-61189-1386207612100-1:2:2:1, started=true }
}] of session [PooledSession { ActiveMQSession
{id=ID:robs-MacBook-Pro.local-61189-1386207612100-1:2:2,started=true} }]
2013-12-04 20:40:36 DEBUG
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate:464 -
Executing callback on JMS Session: PooledSession { ActiveMQSession
{id=ID:robs-MacBook-Pro.local-61189-1386207612100-1:2:2,started=true} }


Claus Ibsen-2 wrote
> And do you run your Camel app is some container or does this happen
> also from an unit test or running standalone etc?

I have been using the maven plugin "mvn camel:run"




--
View this message in context: http://camel.465427.n5.nabble.com/DSL-Logging-not-outputting-to-the-logs-tp5744093p5744340.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DSL Logging not outputting to the logs

Posted by Claus Ibsen <cl...@gmail.com>.
The log uses the route name as the logger name by default.

You can try to specify a logger name to use with the 3 args version
    public Type log(LoggingLevel loggingLevel, String logName, String message) {

And do you run your Camel app is some container or does this happen
also from an unit test or running standalone etc?

On Sun, Dec 1, 2013 at 6:04 PM, mckinnonrob <ro...@gmail.com> wrote:
> Claus Ibsen-2 wrote
>> Are you sure the route pickup any messages to route? The log DSL will
>> only log if there is messages.
>
> Yes I am sure. In my route the body is ultimately being placed on a queue,
> CAMEL_FINAL, and all the messages are showing up there fine.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/DSL-Logging-not-outputting-to-the-logs-tp5744093p5744137.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen