You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Mark Derricutt <ma...@talios.com> on 2008/05/29 05:59:07 UTC

Configuring pax-logging

Does anyone have any good pointers/docs on configuring pax-logging/logging
under Felix/OSGi?

By default, the pax-logging api/service bundles set everything to DEBUG
which just gives waaaaay to much data and I've not yet found any definitive
"how to" guides on configuring this.

Anyone got any pointers/urls?

Mark

-- 
"It is easier to optimize correct code than to correct optimized code." --
Bill Harlan

Re: Configuring pax-logging

Posted by Mark Derricutt <ma...@talios.com>.
So I have (what looks to be simple, and on the right track):

        ServiceReference configurationAdminReference =
bundleContext.getServiceReference(ConfigurationAdmin.class.getName());
        ConfigurationAdmin configurationAdmin = (ConfigurationAdmin)
bundleContext.getService(configurationAdminReference);
        Configuration config =
configurationAdmin.getConfiguration("org.ops4j.pax.logging");
        if (config.getProperties() == null) {
            Properties props = new Properties();
            props.put("Log4J-ConfigFile",
UtilActivator.class.getResource("/log4j.xml").toString());
            config.update(props);
        }

Only this spits out:

[Configuration Updater] DEBUG org.apache.felix.configadmin - Running task
Update: pid=org.ops4j.pax.logging
[Configuration Updater] ERROR org.apache.felix.configadmin - Configuration
org.ops4j.pax.logging belongs to bundle file:dist/smx3-util-1.0.jar but was
requested for bundle file:lib/pax-logging-service-1.1.0.jar

The pax-logging-service is started prior to the bundle which is doing this
configuration.  Is the problem more how I'm using ConfigAdmin or is
pax-logging likely to be the culprit?

Thanks,
Mark



On Thu, May 29, 2008 at 3:59 PM, Mark Derricutt <ma...@talios.com> wrote:

> Does anyone have any good pointers/docs on configuring pax-logging/logging
> under Felix/OSGi?
>
> By default, the pax-logging api/service bundles set everything to DEBUG
> which just gives waaaaay to much data and I've not yet found any definitive
> "how to" guides on configuring this.
>
> Anyone got any pointers/urls?
>
> Mark
>
> --
> "It is easier to optimize correct code than to correct optimized code." --
> Bill Harlan




-- 
"It is easier to optimize correct code than to correct optimized code." --
Bill Harlan