Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
0.9.18
-
None
Description
if you're using LogBack in an Eclipse Equinox OSGI environment and you write Appenders or Converters then
logback.classic
must "know" them.
One way is to use a Fragment Bundle with logback.classic as host bundle.
But Fragments are not very flexible and you have to restart your OSGI Framework.
If using Eclipse Equinox as OSGI Framework you can use Eclipse Buddy Policy
read more here: http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhancements
It would be great if you add the following line to MANIFEST.MF of logback.classic bundle:
Eclipse-BuddyPolicy: registered
If running in other OSGI Frameworks like Felix this line will be ignored,
but running Equinox you can now do the following:
my.appender.bundle has Dependency to logback.classic as Required Bundle
and I can add
Eclipse-RegisterBuddy: logback.classic
Now my Bundle is a Buddy of logback.classic and logback.classic 'knows' my classes