I just had an idea that might solve the problem of being flexible about
the logger while not using reflection.
How about using the LogService interface to provide an adapter to an
arbitrary logger?
We use the FrameworkFactory config to specify a logger. Either as an
object if that is possible or as a class name given by the caller.
The logger must implement LogService and can then internally bridge to
any logging framework.
Using the well known LogService interface would allow to avoid
reflection and we also do not need to change the spec. Of course the
spec could still be changed to standardize how to specify a logger like
this but we could easily already start just in felix.
Christian
On 24.02.2017 15:32, Christian Schneider wrote:
Currently felix framework uses reflection to allow other logging
frameworks. It is a quite complicated and still pretty limited approach.
As far as I know this is only used for karaf to hook in. So I propose
to only allow to choose jul as it is built in and we can avoid to add
dependencies as well as avoid to use reflection.
https://issues.apache.org/jira/browse/FELIX-5525
Karl reviewed the change and is generally positive but we would like
to get feedback from the community if this is a good idea.
Christian
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com