[ 
https://issues.apache.org/jira/browse/SLING-6044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223715#comment-16223715
 ] 

Jörg Hoh edited comment on SLING-6044 at 10/29/17 10:29 AM:
------------------------------------------------------------

I did a try with org.apache.sling.commons.log (version 5.0.0) and 
org.apache.sling.commons.logservice (version 1.0.6) and I can still reproduce 
it:

{code}
9.10.2017 11:23:12.980 *ERROR* [CM Configuration Updater (Update: 
pid=org.apache.sling.commons.log.LogManager)] org.apache.felix.configadmin 
Service [org.apache.felix.cm.ConfigurationAdmin,11, 
[org.osgi.service.cm.ConfigurationAdmin]] [org.osgi.service.cm.ManagedService, 
id=13, bundle=9/slinginstall:org.apache.sling.commons.log-5.0.0.jar]: Updating 
property org.apache.sling.commons.log.file of configuration 
org.apache.sling.commons.log.LogManager caused a problem: LogFile 
/Users/jhoh/aem630/crx-quickstart/logs/error.log already configured by 
configuration 
org.apache.sling.commons.log.LogManager.factory.writer.12de6e32-dc7c-44ab-a696-b09d6c1d7c23
 (org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.file 
: LogFile /Users/jhoh/aem630/crx-quickstart/logs/error.log already configured 
by configuration 
org.apache.sling.commons.log.LogManager.factory.writer.12de6e32-dc7c-44ab-a696-b09d6c1d7c23)
org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.file : 
LogFile /Users/jhoh/aem630/crx-quickstart/logs/error.log already configured by 
configuration 
org.apache.sling.commons.log.LogManager.factory.writer.12de6e32-dc7c-44ab-a696-b09d6c1d7c23
        at 
org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:32)
        at 
org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)
        at 
org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)
        at 
org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)
        at 
org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1583)
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
        at java.lang.Thread.run(Thread.java:748)
Caused by: 
org.apache.sling.commons.log.logback.internal.config.ConfigurationException:
        at 
org.apache.sling.commons.log.logback.internal.LogConfigManager.updateLogWriter(LogConfigManager.java:417)
        at 
org.apache.sling.commons.log.logback.internal.LogConfigManager.updateGlobalConfiguration(LogConfigManager.java:346)
        at 
org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:30)
        ... 7 common frames omitted
{code}

(I modified the "Message pattern" property in the 
org.apache.sling.commons.log.LogManager)


was (Author: joerghoh):
I did a try with org.apache.sling.commons.log (version 5.0.0) and 
org.apache.sling.commons.logservice (version 1.0.6) and I can still reproduce 
it:

```
9.10.2017 11:23:12.980 *ERROR* [CM Configuration Updater (Update: 
pid=org.apache.sling.commons.log.LogManager)] org.apache.felix.configadmin 
Service [org.apache.felix.cm.ConfigurationAdmin,11, 
[org.osgi.service.cm.ConfigurationAdmin]] [org.osgi.service.cm.ManagedService, 
id=13, bundle=9/slinginstall:org.apache.sling.commons.log-5.0.0.jar]: Updating 
property org.apache.sling.commons.log.file of configuration 
org.apache.sling.commons.log.LogManager caused a problem: LogFile 
/Users/jhoh/aem630/crx-quickstart/logs/error.log already configured by 
configuration 
org.apache.sling.commons.log.LogManager.factory.writer.12de6e32-dc7c-44ab-a696-b09d6c1d7c23
 (org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.file 
: LogFile /Users/jhoh/aem630/crx-quickstart/logs/error.log already configured 
by configuration 
org.apache.sling.commons.log.LogManager.factory.writer.12de6e32-dc7c-44ab-a696-b09d6c1d7c23)
org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.file : 
LogFile /Users/jhoh/aem630/crx-quickstart/logs/error.log already configured by 
configuration 
org.apache.sling.commons.log.LogManager.factory.writer.12de6e32-dc7c-44ab-a696-b09d6c1d7c23
        at 
org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:32)
        at 
org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)
        at 
org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)
        at 
org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)
        at 
org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1583)
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
        at java.lang.Thread.run(Thread.java:748)
Caused by: 
org.apache.sling.commons.log.logback.internal.config.ConfigurationException:
        at 
org.apache.sling.commons.log.logback.internal.LogConfigManager.updateLogWriter(LogConfigManager.java:417)
        at 
org.apache.sling.commons.log.logback.internal.LogConfigManager.updateGlobalConfiguration(LogConfigManager.java:346)
        at 
org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:30)
        ... 7 common frames omitted
```

(I modified the "Message pattern" property in the 
org.apache.sling.commons.log.LogManager)

> Conflicting LogManager and LogWriter if using the same logfile
> --------------------------------------------------------------
>
>                 Key: SLING-6044
>                 URL: https://issues.apache.org/jira/browse/SLING-6044
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>    Affects Versions: Commons Log 4.0.2
>            Reporter: Jörg Hoh
>            Assignee: Chetan Mehrotra
>             Fix For: Commons Log 5.0.4
>
>         Attachments: SLING-6044-multiple-loggers-writers.jpg
>
>
> When you have a logmanager and a logwriter pointing to the same file, you get 
> an exception like this:
> {panel}
> 07.09.2016 17:33:31.126 *ERROR* [] CM Configuration Updater (Update: 
> pid=org.apache.sling.commons.log.LogManager) org.apache.felix.configadmin 
> Service [org.apache.felix.cm.ConfigurationAdmin,9, 
> [org.osgi.service.cm.ConfigurationAdmin]] 
> [org.osgi.service.cm.ManagedService, id=10, 
> bundle=7/slinginstall:c:\java\IBM\LibertyProfile\usr\servers\aem-1\sling\_\launchpad\startup\1\org.apache.sling.commons.log-4.0.0.jar]:
>  Updating property org.apache.sling.commons.log.file of configuration 
> org.apache.sling.commons.log.LogManager caused a problem: LogFile 
> C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log already 
> configured by configuration 
> org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af
>  (org.osgi.service.cm.ConfigurationException: 
> org.apache.sling.commons.log.file : LogFile 
> C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log already 
> configured by configuration 
> org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af)
>  
> org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.file 
> : LogFile C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log 
> already configured by configuration 
> org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af
>  
>         at 
> org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:32)
>         at 
> org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:148)
>  
>         at 
> org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:81)
>  
>         at 
> org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1744)
>  
>         at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103) 
>         at java.lang.Thread.run(Thread.java:744) 
> Caused by: 
> org.apache.sling.commons.log.logback.internal.config.ConfigurationException: 
>         at 
> org.apache.sling.commons.log.logback.internal.LogConfigManager.updateLogWriter(LogConfigManager.java:398)
>  
>         at 
> org.apache.sling.commons.log.logback.internal.LogConfigManager.updateGlobalConfiguration(LogConfigManager.java:327)
>  
>         at 
> org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:30)
>  
>         ... 5 common frames omitted
> {panel}
> Obviously the Logmanager internally provides a Logwriter, so these conflict. 
> This should be documented.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to