Search code examples
osgiequinox

How can I turn off the equinox log service in favor of the SLF4J log service?


I'm using the Equinox OSGi container. It has a log service in there 'for free', but I never see any output from it, because I don't have a LogReader. I don't care to go inventing a LogReader, I'd rather just use the slf4j implementation of the LogService which will plug nicely into the rest of my SLF4J logging.

However, it seems as if Equinox 'gets there first'. Is there some way to tell Equinox not to turn on the LogService? Is there some bridge that implements a LogReader by writing the messages to SLF4J?


Solution

  • The LoggerAdmin from OSGi enRoute, http://enroute.osgi.org/services/osgi.enroute.logger.api.html, https://github.com/osgi/osgi.enroute.bundles/tree/master/osgi.enroute.logger.simple.provider, can dispatch OSGi Log Entries into slf4j.