Monday, October 15, 2012

OSGi-friendly APIs

Many existing Java libraries do some classloading for a reason or another. This is the case for SLF4J: it loads its implementations by expecting a class org.slf4j.impl.StaticLoggerBinding in the classpath (and does the same for Markers).

The technique does make sense for the sake of simplicity and to support a large variety of Java setups. However, it would be nice to make it optional, so that people using OSGi or IoC frameworks can implement the bindings differently without having the "legacy" code.

I just made such a proposal to the SLF4J team. I don't really know what answer to expect, but I hope the solution will be adopted sooner or later :).

We'll see :)

1 comment:

  1. I hope this will help you: