[
https://issues.apache.org/jira/browse/FELIX-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16866650#comment-16866650
]
Raymond Augé commented on FELIX-6144:
-------------------------------------
I'll take a look when I get back from vacation next week if no one else has.
> 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
> 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
(v7.6.3#76005)