Yeah this can be tricky as you would have different classloaders and whatnot. Also the log4j could be shared among different Camel applications.
You can use a remote transport of some sort, and send data over HTTP. However if you run in Karaf, then pax-logging, may have some osgi related stuff you can leverage. On Thu, Apr 14, 2011 at 2:17 PM, Gert Villemos <gville...@yahoo.de> wrote: > Creating a custom log4j appender is very easy (... indeed we have one but we > are not happy with it as it only injects into ActiveMQ and not into a Camel > route). > > Our only problem (and this is now turning into a developer question more > than a user question) is how can the custom Appender which is a part of the > log4j hierarchy get a reference to a route producer template? > > If we for example > > 1. Configure an instance of the custom appender and using the > log4j.properties / log4j.xml file configure it to inject into the route > "direct:logs". > > 2. Configure a Camel route 'from("direct:logs").to("activemq:topic:logs)' > > How do we in the log4j Appender get a reference to the ProducerTemplate with > the identifier 'direct:logs'? > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Using-Camel-Log4j-on-Multiple-Machines-tp466678p4302852.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com CamelOne 2011: http://fusesource.com/camelone2011/ Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/