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