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

Felix Meschberger commented on FELIX-428:
-----------------------------------------

> .) Provide a log mechanism when Felix is used in another framework ...

Yes, if your replace "another framework" with "an environment"

 .) Use of syso is not good enough, and redirecting syso to ...

Yes.
Tampering with syso (System.out and System.err) is IMHO problematic, esp. 
inside Servlet Containers.

 .) Setting the log level of just this logger to 0 (and then use the standard 
Log service) ...

This is something comletely different. The Felix framework logger always uses 
the LogService if one is available. The log level only controls whether the log 
message is ignored or handled.

 .) The user will have to be aware that if the Log service is installed ...

No. The initial Logger is only used for framework logging. If users use it for 
other things, so what. It is not good, but none of our  business. Of course 
"users" should use LogService if available becase using a LogService has more 
advantages than just logging. For example the LogService will also log the 
source bundle of the log message.

Finally, the "user", that is the one instantiating and using Felix does not 
need to pass a Logger instance only if there is a specific need. Passing a 
Logger is only intended to be used by the Framework. Bundles should still use 
their own LogService access.


> 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