You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2019/08/21 01:53:00 UTC

[jira] [Assigned] (FELIX-6144) Root logger context configuration is overwritten when ANY configuration changes

     [ https://issues.apache.org/jira/browse/FELIX-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler reassigned FELIX-6144:
---------------------------------------

    Assignee: Carsten Ziegeler

> Root logger context configuration is overwritten when ANY configuration changes
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-6144
>                 URL: https://issues.apache.org/jira/browse/FELIX-6144
>             Project: Felix
>          Issue Type: Bug
>          Components: Log Service
>    Affects Versions: log-1.2.0, log-1.2.2
>            Reporter: Jelle Nelis
>            Assignee: Carsten Ziegeler
>            Priority: Critical
>              Labels: log, log-level, pull-request-available
>             Fix For: log-1.2.2
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The Felix log bundle registers a ConfigurationListener when a ConfigurationAdmin instance is present ([https://github.com/apache/felix/blob/7f4bada389ebdaee8b5ae4530c53f2954c8d0fde/log/src/main/java/org/apache/felix/log/Activator.java#L159] and [https://github.com/apache/felix/blob/7f4bada389ebdaee8b5ae4530c53f2954c8d0fde/log/src/main/java/org/apache/felix/log/ConfigurationListenerImpl.java#L116]). This means it gets notified of ALL configuration events. The implementation of configurationEvent, however, fails to ignore configuration that is not targeted towards the LoggerAdmin. [https://github.com/apache/felix/blob/7f4bada389ebdaee8b5ae4530c53f2954c8d0fde/log/src/main/java/org/apache/felix/log/ConfigurationListenerImpl.java#L133] checks whether or not the pid is meant for a non-root logger context and fills in configAdmin if that is the case. In the case it is anything other (not only "org.osgi.service.log.admin"), configAdmin will be null and since the following lines are not guarded by this if, the configuration of the logger context is overwritten by configuration of a random PID ([https://github.com/apache/felix/blob/7f4bada389ebdaee8b5ae4530c53f2954c8d0fde/log/src/main/java/org/apache/felix/log/ConfigurationListenerImpl.java#L148]), which in normal cases means all log configuration for the logger context is gone at that point.
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)