jboss-logging/jboss-logging — pull request #5 by marschall (2013-03-18 14:56:49+00:00)
Title: JBLOGGING-92 Add support for ExtendedLogService

We are running some JBoss libraries that use jboss-logging inside
Eclipse RCP. We'd like to centralize all logging. Unfortunately OSGi
LogService does not support named loggers, for now they're only
available through the Equinox ExtendedLogService.

This pull commit adds Equinox ExtendedLogService support and contains
the following changes:

- add EquinoxLoggerProvider
- add EquinoxLogger
- add OSGi bundle activator that looks up Equinox ExtendedLogService
- make bundle activation lazy so that the activator actually runs [1]
- change LoggerProviders to also check for Equinox ExtendedLogService
- add "equinox" flag to LoggerProviders

Care has been taken not to impact anybody not running in Equinox

- LoggerProviders does not depend on any new external classes
- the bundle activator does not depend on Equinox classes and should
therefore run fine in other OSGi environments (eg. Felix, JBoss OSGi)
- the Equinox dependency has been marked as optional in the manifest

Even though Equinox loggers are not serializable themselves
serialization is still supported in the same was as for JDK loggers.

https://issues.jboss.org/browse/JBLOGGING-92

[1] http://stackoverflow.com/questions/15475230/state-of-required-bundle-resolved-instead-of-active