Hi Sergey, Thanks for your reply. I had a look at the links. If I understand the function of the different bundles correct, you ran a zookeeper instance in your OSGi container using the cxf-dosgi-ri-discovery-distributed-zookeeper-server bundle and configured it using cxf-dosgi-ri-discovery-distributed-zookeeper-server-config. The difference to my case is that I need to use an independent zookeeper instance running in a separate virtual machine. CXF seems to find the zookeeper instance since I see some log output with the zookeeper IP and I also see log outputs telling me about the endpoint URL of the service that I want to communicate with. The problem is that my ServiceTracker still does not recognize the service.
Concerning the logs that I get. Do you think they come from the container itself? Because there are many logs on the console starting with " org.apache.cxf". I would have guessed that they come from one of the CXF bundles and that CXF is using a certain logging framework like log4j. Do you perhaps know which framework is used for CXF so I can first try to configure CXF and then see where the other logs come from? Cheers, Sven -----Original Message----- From: Sergey Beryozkin [mailto:[email protected]] Sent: 14 February 2012 15:45 To: [email protected] Subject: Re: Configure logging in CXF + pax-web + Jetty Hi, On 14/02/12 13:02, Viehmeier, Sven wrote: > Hello, > > I already mentioned it in a previous mail, but decided to make a new one > since it seems to be a bigger issue. > At the moment, I try to run CXF with the pax-web bundle to be able to > configure the Jetty server provided by pax-web. This combination is working > with CXF 1.2 single bundle distribution, but all the bundles log such a huge > amount of information on the console that it slows down my application. > Therefore, I tried to disable logging for both bundles, but I did not have > success yet. Here is what I tried so far: > > - Create fragment bundles with a log4j.properties and attach them to > CXF and pax-web; had no effect > > - Configure the log level using system properties like > -Dorg.ops4j.pax.logging.DefaultServiceLog.level; had no effect > > - Add pax-logging to my container; Problems here: > > o the single bundle versions of CXF have logging frameworks included so I > cannot use them > > o CXF version 1.2 multibundle needs the package org.apache.log4j.jmx which > is not exported by pax-logging > > o CXF version 1.3 multibundle does not need this package, but I did not get > it to work with my zookeeper (my services are not found anymore) I did manage to run a discovery sample just before doing the release, I got the following bundles added: http://svn.apache.org/viewvc/cxf/dosgi/tags/cxf-dosgi-ri-1.3/distribution/multi-bundle/src/main/resources/distro_discovery_bundles.xml?view=markup and I think I had to set a system property as shown in http://svn.apache.org/viewvc/cxf/dosgi/tags/cxf-dosgi-ri-1.3/discovery/distributed/zookeeper-server-config/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/config/Activator.java?revision=1239591&view=markup though I guess one can set it up from the shell... > > I think there is at least one way to configure the logging in each of these > frameworks (CXF, pax-web, Jetty). Pax-logging should be the most generic > solution so I can tell you more about my problems with it if there is no > easier way to configure the logging. Does anybody have some more hints what I > could try? > > Here are some examples of the log messages that I want to get rid of: > Feb 14, 2012 12:48:15 PM > org.apache.cxf.dosgi.discovery.zookeeper.InterfaceDataMonitorListenerImpl > processChild > INFO: Child: /osgi/service_registry/... > > **************** > notifyListeners({endpoint.framework.uuid=80ddda84-0357-0011-1dd6-a9aea21915ce, > endpoint.id=...}, false) > > [Start Level Event Dispatcher] INFO > org.ops4j.pax.web.service.internal.Activator - Pax Web started > [Framework Event Dispatcher] DEBUG org.ops4j.pax.web.pax-web-jetty-bundle - > BundleEvent STARTED Sorry, no idea :-). If I were to find the solution, then I'd probably get the Karaf source and see how the logging gets centralized there, as it appears to be a container-level issue, how to make sure the Log manager intercepting all the log requests is installed and set up... Cheers, Sergey > > Thanks in advance, > Sven >
