Details
-
Bug
-
Resolution: Fixed
-
Trivial
-
None
-
None
-
None
-
None
Description
There are two minor issues that prevent the use of the LOGBack-Access bundle in an OSGi environment:
1. The bundle manifest for LOGBack-Access needs an similiar update as reported in the LOGBack-Classic-Issues LBCLASSIC-108 and LBCLASSIC-131, otherwise the RollingFileAppender can not be used due to OSGi's classloader restriction.
2. All Import-Packages are mandatory, meaning that you need both Jetty 6.x, Jetty 7.x and Tomcat bundles, otherwise LOGBack-Access will not be resolved. Typically you can only satisfy one requirement (org.mortbay.jetty.* or org.eclipse.jetty.* if you're using Jetty 6.x or 7.x as the servlet container repespectively org.apache.catalina.* while using Tomcat). Making these Imports optional would facilitate the use of the LOGBack-Access bundle.
Please update the Maven-Bundle-Plugin-Configuration in the POM, so that
1. the Core-Packages ch.qos.logback.core.rolling and ch.qos.logback.core.rolling.helper will be declared as Import-Packages
2. Jetty- and Tomcat-Imports are optional
Suggested update:
<Import-Package>
ch.qos.logback.core.*;version="0.9",
ch.qos.logback.core.rolling;version="0.9",
ch.qos.logback.core.rolling.helper;version="0.9",
javax.servlet.*;version="2.5",
org.apache.catalina.*;version="6.0";resolution:=optional,
org.mortbay.jetty.*;version="[5.0,7.0)";resolution:=optional,
org.eclipse.jetty.*;version="7.0";resolution:=optional,
*
</Import-Package>