[ 
https://issues.apache.org/jira/browse/FELIX-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549224
 ] 

Richard S. Hall commented on FELIX-428:
---------------------------------------

I don't think this is unreasonable, but if I understand the patch correctly, 
doesn't this completely replace the Logger of the framework? Felix, you imply 
that this will only capture log messages until the a LogService appears, but 
that is not necessarily the case, right? It really depends on the 
implementation of the passed in Logger subclass; if the subclass decides not to 
use the LogService, then they won't get logged to it. The default 
implementation does work the way you say, though.

If you wanted it to work as a logger until a LogService appears, we would have 
to modify the Logger base class to use the passed in Logger subclass as the 
default logger if no LogService was available. However, if you want the ability 
to completely override the default framework logger, then the current approach 
works for that.

I am not sure which is better.

> Support Application supplied Logger instance for the framework
> --------------------------------------------------------------
>
>                 Key: FELIX-428
>                 URL: https://issues.apache.org/jira/browse/FELIX-428
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Felix Meschberger
>         Attachments: FELIX-428.patch
>
>
> In certain environments where the Felix framework is embeded, the environment 
> may provide a logging facility which should be used by the framework as long 
> as no OSGi LogService is available.
> For example, in Sling we have a web application based launcher, which embeds 
> the Felix framework in a web application. In this case, it would be usefull 
> to have the log messages being directed to the ServletContext.log methods 
> until the LogService is set up.
> Will attach a patch to implement this feature.
> WDYT ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to