You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Grzegorz Grzybek <gr...@gmail.com> on 2014/03/31 21:30:40 UTC

Re: Logging into the bundle log file via to("log:...")

Hello

I did some investigation and I think it's almost impossible to properly set
the bundle in org.ops4j.pax.logging.slf4j.Slf4jLogger which is used by
CamelLogger.

The problem is described  here
<https://issues.apache.org/jira/browse/CAMEL-6694?focusedCommentId=13955364&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13955364> 
. org.ops4j.pax.logging.internal.BundleHelper always finds the camel-core
bundle as the one which requests creating Logger.

So either we introduce a way of configuring
org.ops4j.pax.logging.internal.BundleHelper (by setting a filter or number
of traces in stacktrace) or we could just use user provided (in message
headers) Logger instance and use it in
org.apache.camel.processor.CamelLogProcessor.process(**) methods.

We could use org.apache.camel.util.CamelLogger.log() methods which take
Logger parameter (if appropriate object is found in headers.

What do you think?
regards
Grzegorz Grzybek



--
View this message in context: http://camel.465427.n5.nabble.com/Logging-into-the-bundle-log-file-via-to-log-tp5738205p5749575.html
Sent from the Camel - Users mailing list archive at Nabble.com.