You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ro...@apache.org on 2018/05/28 21:01:10 UTC

svn commit: r1832420 [3/3] - in /felix/trunk: logback/ logback/itests/ logback/itests/immediate-equinox-logservice/ logback/itests/immediate-equinox-logservice/src/ logback/itests/immediate-equinox-logservice/src/main/ logback/itests/immediate-equinox-...

Added: felix/trunk/logback/itests/standard-log4j1/logback.xml
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j1/logback.xml?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j1/logback.xml (added)
+++ felix/trunk/logback/itests/standard-log4j1/logback.xml Mon May 28 21:01:08 2018
@@ -0,0 +1,50 @@
+<!--
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration>
+    <!--  scan="true" scanPeriod="5 seconds" debug="true"> -->
+    <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
+        <resetJUL>true</resetJUL>
+    </contextListener>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <!-- <pattern>%d{HH:mm:ss.SSS} [%.15thread] %-5level %logger{36}:%line - %msg%n</pattern> -->
+            <pattern>%-5level %logger{1000}:%line - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+        <file>target/test.log</file>
+        <encoder>
+            <pattern>%level|%logger{1000}|%msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <logger name="Events.Bundle" level="ERROR"/>
+    <logger name="Events.Framework" level="ERROR"/>
+    <logger name="Events.Service" level="ERROR"/>
+    <logger name="LogService" level="ERROR"/>
+
+    <logger name="Events.Service.org.apache.logback.itests" level="INFO"/>
+    <logger name="LogService.org.apache.logback.itests" level="OFF"/>
+
+    <logger name="org.apache.felix.logback.test" level="DEBUG" />
+
+    <root level="ERROR">
+        <appender-ref ref="STDOUT" />
+        <appender-ref ref="FILE" />
+    </root>
+</configuration>

Added: felix/trunk/logback/itests/standard-log4j1/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j1/pom.xml?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j1/pom.xml (added)
+++ felix/trunk/logback/itests/standard-log4j1/pom.xml Mon May 28 21:01:08 2018
@@ -0,0 +1,53 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>org.apache.felix.logback.itests.reactor</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <artifactId>org.apache.felix.logback.itests.standard.log4j1</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.logback.itests.helper</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-resolver-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-testing-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: felix/trunk/logback/itests/standard-log4j1/src/main/java/org/apache/felix/logback/test/Log4j1Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j1/src/main/java/org/apache/felix/logback/test/Log4j1Test.java?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j1/src/main/java/org/apache/felix/logback/test/Log4j1Test.java (added)
+++ felix/trunk/logback/itests/standard-log4j1/src/main/java/org/apache/felix/logback/test/Log4j1Test.java Mon May 28 21:01:08 2018
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.logback.test;
+
+import org.apache.felix.logback.test.helper.LogTestHelper;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+public class Log4j1Test extends LogTestHelper {
+
+    @Test
+    public void test() {
+        long time = System.nanoTime();
+        Logger logger = LogManager.getLogger(getClass());
+        if (logger.isInfoEnabled()) {
+            logger.info(time + "");
+        }
+        assertLog("INFO", getClass().getName(), time);
+    }
+
+}

Added: felix/trunk/logback/itests/standard-log4j2/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j2/bnd.bnd?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j2/bnd.bnd (added)
+++ felix/trunk/logback/itests/standard-log4j2/bnd.bnd Mon May 28 21:01:08 2018
@@ -0,0 +1,51 @@
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+
+Bundle-Activator: org.apache.felix.logback.test.Activator
+Export-Package: ${p}.*
+Test-Cases: ${classes;CONCRETE;ANNOTATED;org.junit.Test}
+-conditionalpackage: org.apache.felix.logback.test.helper
+
+##
+## All of remainder is to make bnd's `-make` function work in our maven project.
+##
+
+# We need to define a root package so we can split the classpath contents into many `sub-bundles`.
+p = org.apache.felix.logbackend.test
+
+# We need to tell bnd's make function what the classpath is for making `sub-bundles`.
+-classpath: target/classes
+
+# This is the instruction containing the make recipe and the recipe dir pattern for finding the bnd files.
+-make: (*).(jar); type=bnd; recipe="${.}/bnd/$1.bnd"
+
+# Finally, include the `-make'd` jars in the test bundle. This also happens to trigger the make function
+# so don't forget to list new jars here as new bnd files are added into the recipe dir.
+#-includeresource:\
+#	tb1.jar,\
+
+# Don't forget that we had to coax the `maven-jar-plugin` NOT to include the `sub-bundle` packages in
+# the root bundle:
+#
+# 				<artifactId>maven-jar-plugin</artifactId>
+#				<configuration>
+#					<includes>
+#						<include>META-INF/*</include>
+#						<include>OSGI-INF/*</include>
+#						<include>OSGI-OPT/*</include>
+#						<!-- List all the packages we want to keep in the root bundle. -->
+#						<include>org/apache/aries/cdi/test/cases/*</include>
+#						<include>org/apache/aries/cdi/test/components/*</include>
+#						<!-- Make sure to include all the sub-bundles we created. -->
+#						<include>*.jar</include>
+#					</includes>
+#				</configuration>

Added: felix/trunk/logback/itests/standard-log4j2/itest.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j2/itest.bndrun?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j2/itest.bndrun (added)
+++ felix/trunk/logback/itests/standard-log4j2/itest.bndrun Mon May 28 21:01:08 2018
@@ -0,0 +1,27 @@
+-standalone: target/index.xml
+-runee: JavaSE-1.8
+-resolve.effective: resolve, active
+
+-runfw: org.apache.felix.framework
+
+-runrequires:\
+    osgi.identity;filter:='(osgi.identity=ch.qos.logback.classic)',\
+    osgi.identity;filter:='(osgi.identity=org.apache.logging.log4j.to-slf4j)',\
+    osgi.identity;filter:='(osgi.identity=org.apache.felix.logback.itests.standard.log4j2)'
+
+-runproperties: \
+    logback.configurationFile=file:${.}/logback.xml
+
+-runbundles: \
+	slf4j.api;version='[1.7.25,1.7.26)',\
+	ch.qos.logback.classic;version='[1.2.3,1.2.4)',\
+	ch.qos.logback.core;version='[1.2.3,1.2.4)',\
+	org.apache.logging.log4j.to-slf4j;version='[2.11.0,2.11.1)',\
+	org.apache.logging.log4j.api;version='[2.11.0,2.11.1)',\
+	osgi.enroute.hamcrest.wrapper;version='[1.3.0,1.3.1)',\
+	osgi.enroute.junit.wrapper;version='[4.12.0,4.12.1)',\
+	org.apache.felix.logback.itests.standard.log4j2;version='[1.0.0,1.0.1)',\
+	org.osgi.service.log;version='[1.4.0,1.4.1)',\
+	org.osgi.util.function;version='[1.1.0,1.1.1)',\
+	org.osgi.util.promise;version='[1.1.0,1.1.1)',\
+	org.osgi.util.pushstream;version='[1.0.0,1.0.1)'

Added: felix/trunk/logback/itests/standard-log4j2/logback.xml
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j2/logback.xml?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j2/logback.xml (added)
+++ felix/trunk/logback/itests/standard-log4j2/logback.xml Mon May 28 21:01:08 2018
@@ -0,0 +1,50 @@
+<!--
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration>
+    <!--  scan="true" scanPeriod="5 seconds" debug="true"> -->
+    <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
+        <resetJUL>true</resetJUL>
+    </contextListener>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <!-- <pattern>%d{HH:mm:ss.SSS} [%.15thread] %-5level %logger{36}:%line - %msg%n</pattern> -->
+            <pattern>%-5level %logger{1000}:%line - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+        <file>target/test.log</file>
+        <encoder>
+            <pattern>%level|%logger{1000}|%msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <logger name="Events.Bundle" level="ERROR"/>
+    <logger name="Events.Framework" level="ERROR"/>
+    <logger name="Events.Service" level="ERROR"/>
+    <logger name="LogService" level="ERROR"/>
+
+    <logger name="Events.Service.org.apache.logback.itests" level="INFO"/>
+    <logger name="LogService.org.apache.logback.itests" level="OFF"/>
+
+    <logger name="org.apache.felix.logback.test" level="DEBUG" />
+
+    <root level="ERROR">
+        <appender-ref ref="STDOUT" />
+        <appender-ref ref="FILE" />
+    </root>
+</configuration>

Added: felix/trunk/logback/itests/standard-log4j2/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j2/pom.xml?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j2/pom.xml (added)
+++ felix/trunk/logback/itests/standard-log4j2/pom.xml Mon May 28 21:01:08 2018
@@ -0,0 +1,53 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>org.apache.felix.logback.itests.reactor</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <artifactId>org.apache.felix.logback.itests.standard.log4j2</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.logback.itests.helper</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-resolver-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-testing-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: felix/trunk/logback/itests/standard-log4j2/src/main/java/org/apache/felix/logback/test/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j2/src/main/java/org/apache/felix/logback/test/Activator.java?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j2/src/main/java/org/apache/felix/logback/test/Activator.java (added)
+++ felix/trunk/logback/itests/standard-log4j2/src/main/java/org/apache/felix/logback/test/Activator.java Mon May 28 21:01:08 2018
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.logback.test;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.logging.log4j.spi.Provider;
+import org.apache.logging.slf4j.MDCContextMap;
+import org.apache.logging.slf4j.SLF4JLoggerContextFactory;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class Activator implements BundleActivator {
+
+    @Override
+    public void start(BundleContext bundleContext) throws Exception {
+        Provider slf4jProvider = new Provider(
+            15, "2.6.0", SLF4JLoggerContextFactory.class, MDCContextMap.class);
+
+        Dictionary<String, Object> properties = new Hashtable<>();
+
+        // The following value is pulled from here [1] but I think it's a typo [2]
+        // [1] https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=blob;f=log4j-api/src/main/java/org/apache/logging/log4j/util/Activator.java;h=c7910e505e18b9de339c7671641d04aceb2d9b37;hb=HEAD#l103
+        // [2] https://issues.apache.org/jira/browse/LOG4J2-2343
+        properties.put("APIVersion", "2.60");
+
+        serviceRegistration = bundleContext.registerService(Provider.class, slf4jProvider, properties);
+    }
+
+    @Override
+    public void stop(BundleContext bundleContext) throws Exception {
+        serviceRegistration.unregister();
+    }
+
+    private volatile ServiceRegistration<Provider> serviceRegistration;
+
+}

Added: felix/trunk/logback/itests/standard-log4j2/src/main/java/org/apache/felix/logback/test/Log4j2Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-log4j2/src/main/java/org/apache/felix/logback/test/Log4j2Test.java?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-log4j2/src/main/java/org/apache/felix/logback/test/Log4j2Test.java (added)
+++ felix/trunk/logback/itests/standard-log4j2/src/main/java/org/apache/felix/logback/test/Log4j2Test.java Mon May 28 21:01:08 2018
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.logback.test;
+
+import org.apache.felix.logback.test.helper.LogTestHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.junit.Test;
+
+public class Log4j2Test extends LogTestHelper {
+
+    @Test
+    public void test() {
+
+        // You'll notice that this setup requires that we publish
+        // an slf4j Provider as a service. See the activator in this bundle.
+
+        long time = System.nanoTime();
+        Logger logger = LogManager.getLogger(getClass());
+        if (logger.isInfoEnabled()) {
+            logger.info(time + "");
+        }
+        assertLog("INFO", getClass().getName(), time);
+    }
+
+}

Added: felix/trunk/logback/itests/standard-slf4j/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-slf4j/bnd.bnd?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-slf4j/bnd.bnd (added)
+++ felix/trunk/logback/itests/standard-slf4j/bnd.bnd Mon May 28 21:01:08 2018
@@ -0,0 +1,50 @@
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+
+Export-Package: ${p}.*
+Test-Cases: ${classes;CONCRETE;ANNOTATED;org.junit.Test}
+-conditionalpackage: org.apache.felix.logback.test.helper
+
+##
+## All of remainder is to make bnd's `-make` function work in our maven project.
+##
+
+# We need to define a root package so we can split the classpath contents into many `sub-bundles`.
+p = org.apache.felix.logbackend.test
+
+# We need to tell bnd's make function what the classpath is for making `sub-bundles`.
+-classpath: target/classes
+
+# This is the instruction containing the make recipe and the recipe dir pattern for finding the bnd files.
+-make: (*).(jar); type=bnd; recipe="${.}/bnd/$1.bnd"
+
+# Finally, include the `-make'd` jars in the test bundle. This also happens to trigger the make function
+# so don't forget to list new jars here as new bnd files are added into the recipe dir.
+#-includeresource:\
+#	tb1.jar,\
+
+# Don't forget that we had to coax the `maven-jar-plugin` NOT to include the `sub-bundle` packages in
+# the root bundle:
+#
+# 				<artifactId>maven-jar-plugin</artifactId>
+#				<configuration>
+#					<includes>
+#						<include>META-INF/*</include>
+#						<include>OSGI-INF/*</include>
+#						<include>OSGI-OPT/*</include>
+#						<!-- List all the packages we want to keep in the root bundle. -->
+#						<include>org/apache/aries/cdi/test/cases/*</include>
+#						<include>org/apache/aries/cdi/test/components/*</include>
+#						<!-- Make sure to include all the sub-bundles we created. -->
+#						<include>*.jar</include>
+#					</includes>
+#				</configuration>

Added: felix/trunk/logback/itests/standard-slf4j/itest.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-slf4j/itest.bndrun?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-slf4j/itest.bndrun (added)
+++ felix/trunk/logback/itests/standard-slf4j/itest.bndrun Mon May 28 21:01:08 2018
@@ -0,0 +1,24 @@
+-standalone: target/index.xml
+-runee: JavaSE-1.8
+-resolve.effective: resolve, active
+
+-runfw: org.apache.felix.framework
+
+-runrequires:\
+    osgi.identity;filter:='(osgi.identity=ch.qos.logback.classic)',\
+    osgi.identity;filter:='(osgi.identity=org.apache.felix.logback.itests.standard.slf4j)'
+
+-runproperties: \
+    logback.configurationFile=file:${.}/logback.xml
+
+-runbundles: \
+	slf4j.api;version='[1.7.25,1.7.26)',\
+	ch.qos.logback.classic;version='[1.2.3,1.2.4)',\
+	ch.qos.logback.core;version='[1.2.3,1.2.4)',\
+	osgi.enroute.hamcrest.wrapper;version='[1.3.0,1.3.1)',\
+	osgi.enroute.junit.wrapper;version='[4.12.0,4.12.1)',\
+	org.apache.felix.logback.itests.standard.slf4j;version='[1.0.0,1.0.1)',\
+	org.osgi.service.log;version='[1.4.0,1.4.1)',\
+	org.osgi.util.function;version='[1.1.0,1.1.1)',\
+	org.osgi.util.promise;version='[1.1.0,1.1.1)',\
+	org.osgi.util.pushstream;version='[1.0.0,1.0.1)'

Added: felix/trunk/logback/itests/standard-slf4j/logback.xml
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-slf4j/logback.xml?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-slf4j/logback.xml (added)
+++ felix/trunk/logback/itests/standard-slf4j/logback.xml Mon May 28 21:01:08 2018
@@ -0,0 +1,50 @@
+<!--
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<configuration>
+    <!--  scan="true" scanPeriod="5 seconds" debug="true"> -->
+    <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
+        <resetJUL>true</resetJUL>
+    </contextListener>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <!-- <pattern>%d{HH:mm:ss.SSS} [%.15thread] %-5level %logger{36}:%line - %msg%n</pattern> -->
+            <pattern>%-5level %logger{1000}:%line - %msg%n</pattern>
+        </encoder>
+    </appender>
+    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+        <file>target/test.log</file>
+        <encoder>
+            <pattern>%level|%logger{1000}|%msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <logger name="Events.Bundle" level="ERROR"/>
+    <logger name="Events.Framework" level="ERROR"/>
+    <logger name="Events.Service" level="ERROR"/>
+    <logger name="LogService" level="ERROR"/>
+
+    <logger name="Events.Service.org.apache.logback.itests" level="INFO"/>
+    <logger name="LogService.org.apache.logback.itests" level="OFF"/>
+
+    <logger name="org.apache.felix.logback.test" level="DEBUG" />
+
+    <root level="ERROR">
+        <appender-ref ref="STDOUT" />
+        <appender-ref ref="FILE" />
+    </root>
+</configuration>

Added: felix/trunk/logback/itests/standard-slf4j/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-slf4j/pom.xml?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-slf4j/pom.xml (added)
+++ felix/trunk/logback/itests/standard-slf4j/pom.xml Mon May 28 21:01:08 2018
@@ -0,0 +1,53 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>org.apache.felix.logback.itests.reactor</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <artifactId>org.apache.felix.logback.itests.standard.slf4j</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.logback.itests.helper</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-resolver-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-testing-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: felix/trunk/logback/itests/standard-slf4j/src/main/java/org/apache/felix/logback/test/SLF4JTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/standard-slf4j/src/main/java/org/apache/felix/logback/test/SLF4JTest.java?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/standard-slf4j/src/main/java/org/apache/felix/logback/test/SLF4JTest.java (added)
+++ felix/trunk/logback/itests/standard-slf4j/src/main/java/org/apache/felix/logback/test/SLF4JTest.java Mon May 28 21:01:08 2018
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.logback.test;
+
+import org.apache.felix.logback.test.helper.LogTestHelper;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SLF4JTest extends LogTestHelper {
+
+    @Test
+    public void test() {
+        long time = System.nanoTime();
+        Logger logger = LoggerFactory.getLogger(getClass());
+        if (logger.isInfoEnabled()) {
+            logger.info(time + "");
+        }
+        assertLog("INFO", getClass().getName(), time);
+    }
+
+}

Added: felix/trunk/logback/itests/test-helper/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/test-helper/pom.xml?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/test-helper/pom.xml (added)
+++ felix/trunk/logback/itests/test-helper/pom.xml Mon May 28 21:01:08 2018
@@ -0,0 +1,31 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>org.apache.felix.logback.itests.reactor</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <artifactId>org.apache.felix.logback.itests.helper</artifactId>
+</project>

Added: felix/trunk/logback/itests/test-helper/src/main/java/org/apache/felix/logback/test/helper/LogTestHelper.java
URL: http://svn.apache.org/viewvc/felix/trunk/logback/itests/test-helper/src/main/java/org/apache/felix/logback/test/helper/LogTestHelper.java?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/itests/test-helper/src/main/java/org/apache/felix/logback/test/helper/LogTestHelper.java (added)
+++ felix/trunk/logback/itests/test-helper/src/main/java/org/apache/felix/logback/test/helper/LogTestHelper.java Mon May 28 21:01:08 2018
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.logback.test.helper;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Scanner;
+
+import org.junit.BeforeClass;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.FileAppender;
+import ch.qos.logback.core.recovery.ResilientFileOutputStream;
+import junit.framework.AssertionFailedError;
+
+public class LogTestHelper {
+
+    protected static FileAppender<ILoggingEvent> fileAppender;
+
+    @BeforeClass
+    public static void before() throws Exception {
+        LoggerContext context = (LoggerContext)org.slf4j.LoggerFactory.getILoggerFactory();
+
+        for (ch.qos.logback.classic.Logger logger : context.getLoggerList()) {
+            for (Iterator<Appender<ILoggingEvent>> index = logger.iteratorForAppenders(); index.hasNext();) {
+                Appender<ILoggingEvent> appender = index.next();
+
+                if (appender instanceof FileAppender) {
+                    fileAppender = (FileAppender<ILoggingEvent>)appender;
+                }
+            }
+        }
+    }
+
+    protected void assertLog(String level, String name, long time) {
+        assertLog(level + "|" + name + "|" + time);
+    }
+
+    protected void assertLog(String record) {
+        boolean found = false;
+
+        ResilientFileOutputStream rfos = (ResilientFileOutputStream)fileAppender.getOutputStream();
+        rfos.flush();
+        try {
+            rfos.getChannel().force(true);
+        } catch (IOException e1) {
+            e1.printStackTrace();
+        }
+        File logFile = rfos.getFile();
+
+        try (Scanner sc = new Scanner(logFile)) {
+            while (sc.hasNextLine()) {
+                String nextLine = sc.nextLine();
+
+                if (nextLine.equals(record)) {
+                    found = true;
+                }
+            }
+        }
+        catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+
+        if (!found) {
+            throw new AssertionFailedError("Log record not found: " + record);
+        }
+    }
+
+    protected static org.osgi.service.log.Logger getLogger(Class<?> clazz) {
+        BundleContext bundleContext = FrameworkUtil.getBundle(clazz).getBundleContext();
+        ServiceReference<org.osgi.service.log.LoggerFactory> serviceReference =
+            bundleContext.getServiceReference(org.osgi.service.log.LoggerFactory.class);
+        org.osgi.service.log.LoggerFactory loggerFactory = bundleContext.getService(serviceReference);
+        return loggerFactory.getLogger(clazz);
+    }
+
+}

Copied: felix/trunk/logback/logback/LICENSE (from r1832252, felix/trunk/logbackend/LICENSE)
URL: http://svn.apache.org/viewvc/felix/trunk/logback/logback/LICENSE?p2=felix/trunk/logback/logback/LICENSE&p1=felix/trunk/logbackend/LICENSE&r1=1832252&r2=1832420&rev=1832420&view=diff
==============================================================================
    (empty)

Copied: felix/trunk/logback/logback/NOTICE (from r1832252, felix/trunk/logbackend/NOTICE)
URL: http://svn.apache.org/viewvc/felix/trunk/logback/logback/NOTICE?p2=felix/trunk/logback/logback/NOTICE&p1=felix/trunk/logbackend/NOTICE&r1=1832252&r2=1832420&rev=1832420&view=diff
==============================================================================
    (empty)

Added: felix/trunk/logback/logback/README.md
URL: http://svn.apache.org/viewvc/felix/trunk/logback/logback/README.md?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/logback/README.md (added)
+++ felix/trunk/logback/logback/README.md Mon May 28 21:01:08 2018
@@ -0,0 +1,152 @@
+# Apache Felix Logback
+
+**Apache Felix Logback** is a small integration of the [Logback](https://logback.qos.ch/) backend with OSGi.
+
+With **OSGi R7** the **Log Service Specification 1.4**  (Log 1.4) brings a slew of new features designed to improve the developer experience with logging, the details of which can be read about [here](https://osgi.org/specification/osgi.cmpn/7.0.0/service.log.html).
+
+This project is intended to help bridge the last frontier of OSGi logging by leveraging many capabilities of [Logback](https://logback.qos.ch/), the new **Log 1.4** features to provide a **unified backend** where:
+
+1. all logging is configured in one place
+2. all log records are appended together (or at least all appenders are setup in one place)
+3. support as many logging APIs as possible
+
+The LICENSE is of course [Apache License Version 2.0](./LICENSE).
+
+## Depedencies
+
+First, to add Logback to an OSGi framework include the following dependencies
+
+```xml
+<dependency>
+	<groupId>ch.qos.logback</groupId>
+	<artifactId>logback-classic</artifactId>
+	<version>1.2.x</version>
+</dependency>
+<dependency>
+	<groupId>ch.qos.logback</groupId>
+	<artifactId>logback-core</artifactId>
+	<version>1.2.x</version>
+</dependency>
+<dependency>
+	<groupId>org.slf4j</groupId>
+	<artifactId>slf4j-api</artifactId>
+	<version>1.7.x</version>
+</dependency>
+```
+
+These provide the `slf4j` logging API over the Logback backend.
+
+## Basic Configuration
+
+Configuring logback is most easily handled by setting the system property `logback.configurationFile` to point to a file on the file system.
+
+This is an example using a *bndrun* file:
+
+```properties
+-runproperties: logback.configurationFile=file:${.}/logback.xml
+```
+
+where in bnd `${.}` gives the path to the directory of the bndrun file.
+
+Logback offers many features from it's configuration file, so make sure to look through the [documentation](https://logback.qos.ch/documentation.html).
+
+## Deployment Options
+
+There are at least two possible deployment scenarios.
+
+### The Standard Approach
+
+The **standard approach** is to install all bundles into the OSGi runtime.
+
+**pros**:
+
+- this is the most understood and expected deployment scenario
+- bundles are managed through any OSGi management agent
+
+**cons**:
+
+- due to the fact that logging APIs are most comonly static there is an inevitable race condition which is exacerbated by aspects such as:
+  - the order in which the bundles are started
+  - which bundle makes the first call the static API that most-likely has the side effect of binding an implementation
+  - it's not possible to ensure that all log records are temporaly recieved when they are made which means that some form of queue[*](*)  is required to temporarily store records until the log engine is ready or, as in the vast majority of cases, simply fail outright.
+
+[^*]: *(In the case of the OSGi Log Service this is handled by implementations that support Log 1.4, or perhaps earlier through proprietary means. Most logging frameworks simply do not support this type of feature.)*
+
+### The RunPath Approach
+
+The **runpath approach** is intended overcome the **cons** of *the standard approach*; to initialize the log engine and allow APIs to bind to implementations as early as possible in order to capture all records without resorting to a queues, being worried about binding issues, or having to be concerned with missed logs due to start ordering.
+
+**pros**:
+
+- there's very little chance to miss any log records
+- there are no temporal issues for binding or bundle start order since the log engine is setup before most other application activities take place
+
+**cons**:
+
+- bundles on the runpath are not installed into the framework and so they cannot be managed through regular means. *On the other hand, logging is one of those infrastructural aspects that trancends the application and for which there are very few scenarios under which one would want to manage logging API or implementation bundles this way. Configuration? Sure!*
+
+## Unified Backend
+
+Of course adding Logback does not magically result in all logs being funnelled into the same appenders, particularly the OSGi logs. However, it is quite common to assemble an OSGi application from a variety of bundles which use a variety of logging APIs. Many of these can already be mapped onto Logback.
+
+Many examples setting up the various logging APIs can be found in the integration tests of the project.
+
+The following APIs are tested:
+
+- JBoss Logging 3.3.x
+- Commons Logging 1.2
+- JUL (Java Util Logging)
+- Log4j 1
+- Log4j 2
+- Slf4j
+
+## Mapping of OSGi Events
+
+
+The OSGi Log specification describes events resulting in log records. **Log 1.4** defines logger names mapping to these events.
+
+| Event                     | Logger Name        | Events types                                                 |
+| ------------------------- | ------------------ | ------------------------------------------------------------ |
+| Bundle event              | `Events.Bundle`    | `INSTALLED` - BundleEvent INSTALLED<br />`STARTED` - BundleEvent STARTED<br />`STOPPED` - BundleEvent STOPPED<br />`UPDATED` - BundleEvent UPDATED<br />`UNINSTALLED` - BundleEvent UNINSTALLED<br />`RESOLVED` - BundleEvent RESOLVED<br />`UNRESOLVED` - BundleEvent UNRESOLVED |
+| Service event             | `Events.Service`   | `REGISTERED` - ServiceEvent REGISTERED<br /> `MODIFIED` - ServiceEvent MODIFIED<br /> `UNREGISTERING` - ServiceEvent UNREGISTERING |
+| Framework event           | `Events.Framework` | `STARTED` - FrameworkEvent STARTED<br />`ERROR` - FrameworkEvent ERROR<br />`PACKAGES_REFRESHED` - FrameworkEvent PACKAGES REFRESHED<br />`STARTLEVEL_CHANGED` - FrameworkEvent STARTLEVEL CHANGED<br />`WARNING` - FrameworkEvent WARNING<br />`INFO` - FrameworkEvent INFO |
+| Legacy Log Service events | `LogService`       | any log events originating from bundles that used the original `LogService` logging API |
+
+**Note:** In order to improve the granularity of the logging associated with these events, **Apache Felix Logback** makes it possible to refer to these mappings per bundle by appending a period (`.`) and segments of the `Bundle-SymbolicName` of the originating bundle(s) to the logger names. This greatly improves the configurability.
+
+Consider the following `logback.xml` example:
+
+```xml
+<configuration>
+	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder>
+			<pattern>%d{HH:mm:ss.SSS} [%.15thread] %-5level %logger{36}:%line - %msg%n</pattern>
+		</encoder>
+	</appender>
+
+    <!-- log all bundle events -->
+	<logger name="Events.Bundle" level="TRACE"/>
+
+    <!-- WARN framework service events, because we can -->
+	<logger name="Events.Service.org.eclipse.osgi" level="WARN"/>
+
+    <!-- turn OFF legacy Log Service records from bundles with BSN `org.baz.*` -->
+	<logger name="LogService.org.baz" level="OFF"/>
+
+    <!-- DEBUG service events for bundles with BSN `org.fum.*` -->
+    <logger name="Events.Service.org.fum" level="DEBUG"/>
+
+    <!-- DEBUG custom project -->
+	<logger name="org.my.foo" level="DEBUG"/>
+
+	<root level="ERROR">
+		<appender-ref ref="STDOUT" />
+	</root>
+</configuration>
+```
+
+
+## Notes
+
+- **Apache Felix Logback** supports Logback's [automatic reloading](https://logback.qos.ch/manual/configuration.html#autoScan) upon file modification
+- When using **equinox** framework you may want to disable it's internal appenders using the system property `eclipse.log.enabled=false`

Copied: felix/trunk/logback/logback/pom.xml (from r1832252, felix/trunk/logbackend/pom.xml)
URL: http://svn.apache.org/viewvc/felix/trunk/logback/logback/pom.xml?p2=felix/trunk/logback/logback/pom.xml&p1=felix/trunk/logbackend/pom.xml&r1=1832252&r2=1832420&rev=1832420&view=diff
==============================================================================
--- felix/trunk/logbackend/pom.xml (original)
+++ felix/trunk/logback/logback/pom.xml Mon May 28 21:01:08 2018
@@ -19,9 +19,9 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <parent>
         <groupId>org.apache.felix</groupId>
-        <artifactId>felix-parent</artifactId>
-        <version>4</version>
-        <relativePath>../pom/pom.xml</relativePath>
+        <artifactId>org.apache.felix.logback.reactor</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>..</relativePath>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
@@ -31,7 +31,7 @@
         A simple integration of the OSGi R7 Log (1.4) service to Logback backend.
     </description>
     <version>1.0.0-SNAPSHOT</version>
-    <artifactId>org.apache.felix.logbackend</artifactId>
+    <artifactId>org.apache.felix.logback</artifactId>
 
     <dependencies>
         <dependency>
@@ -48,8 +48,7 @@
         <dependency>
             <groupId>org.eclipse.platform</groupId>
             <artifactId>org.eclipse.osgi</artifactId>
-            <version>3.12.100</version>
-            <optional>true</optional>
+            <version>3.13.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -74,6 +73,74 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>com.googlecode.maven-download-plugin</groupId>
+                <artifactId>download-maven-plugin</artifactId>
+                <version>1.4.0</version>
+                <executions>
+                    <execution>
+                        <id>get-equinox-3.13.0</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>wget</goal>
+                        </goals>
+                        <configuration>
+                            <url>http://download.eclipse.org/eclipse/updates/4.8milestones/S-4.8RC2-201805240900/plugins/org.eclipse.osgi_3.13.0.v20180409-1500.jar</url>
+                            <outputDirectory>${project.build.directory}/equinox</outputDirectory>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>get-equinox-3.13.0-sources</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>wget</goal>
+                        </goals>
+                        <configuration>
+                            <url>http://download.eclipse.org/eclipse/updates/4.8milestones/S-4.8RC2-201805240900/plugins/org.eclipse.osgi.source_3.13.0.v20180409-1500.jar</url>
+                            <outputDirectory>${project.build.directory}/equinox</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-install-plugin</artifactId>
+                <version>2.5.2</version>
+                <executions>
+                    <execution>
+                        <id>install-equinox</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>install-file</goal>
+                        </goals>
+                        <configuration>
+                            <repositoryLayout>default</repositoryLayout>
+                            <groupId>org.eclipse.platform</groupId>
+                            <artifactId>org.eclipse.osgi</artifactId>
+                            <version>3.13.0</version>
+                            <file>${project.build.directory}/equinox/org.eclipse.osgi_3.13.0.v20180409-1500.jar</file>
+                            <packaging>jar</packaging>
+                            <generatePom>true</generatePom>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>install-equinox-sources</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>install-file</goal>
+                        </goals>
+                        <configuration>
+                            <repositoryLayout>default</repositoryLayout>
+                            <groupId>org.eclipse.platform</groupId>
+                            <artifactId>org.eclipse.osgi</artifactId>
+                            <version>3.13.0</version>
+                            <file>${project.build.directory}/equinox/org.eclipse.osgi.source_3.13.0.v20180409-1500.jar</file>
+                            <packaging>jar</packaging>
+                            <classifier>sources</classifier>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
@@ -88,6 +155,7 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
+                        <Bundle-Activator>org.apache.felix.logback.internal.Activator</Bundle-Activator>
                         <Import-Package>!org.eclipse.osgi.internal.hookregistry, *</Import-Package>
                     </instructions>
                 </configuration>

Copied: felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/Activator.java (from r1832252, felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/Activator.java)
URL: http://svn.apache.org/viewvc/felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/Activator.java?p2=felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/Activator.java&p1=felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/Activator.java&r1=1832252&r2=1832420&rev=1832420&view=diff
==============================================================================
--- felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/Activator.java (original)
+++ felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/Activator.java Mon May 28 21:01:08 2018
@@ -12,21 +12,17 @@
  * limitations under the License.
  */
 
-package org.apache.felix.logbackend.internal;
+package org.apache.felix.logback.internal;
 
 import java.util.AbstractMap.SimpleEntry;
 
-import org.osgi.annotation.bundle.Header;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.log.LogReaderService;
 import org.osgi.service.log.admin.LoggerAdmin;
 import org.osgi.util.tracker.ServiceTracker;
 
-@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")
-@Header(name = Constants.BUNDLE_VENDOR, value = "The Apache Software Foundation")
 public class Activator implements BundleActivator {
 
     private volatile ServiceTracker<LoggerAdmin, LRST> lat;

Copied: felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/EquinoxHookSupport.java (from r1832252, felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/EquinoxHookSupport.java)
URL: http://svn.apache.org/viewvc/felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/EquinoxHookSupport.java?p2=felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/EquinoxHookSupport.java&p1=felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/EquinoxHookSupport.java&r1=1832252&r2=1832420&rev=1832420&view=diff
==============================================================================
--- felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/EquinoxHookSupport.java (original)
+++ felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/EquinoxHookSupport.java Mon May 28 21:01:08 2018
@@ -12,7 +12,7 @@
  * limitations under the License.
  */
 
-package org.apache.felix.logbackend.internal;
+package org.apache.felix.logback.internal;
 
 import org.eclipse.osgi.internal.hookregistry.ActivatorHookFactory;
 import org.eclipse.osgi.internal.hookregistry.HookConfigurator;

Copied: felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/LogbackLogListener.java (from r1832252, felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/LogbackLogListener.java)
URL: http://svn.apache.org/viewvc/felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/LogbackLogListener.java?p2=felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/LogbackLogListener.java&p1=felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/LogbackLogListener.java&r1=1832252&r2=1832420&rev=1832420&view=diff
==============================================================================
--- felix/trunk/logbackend/src/main/java/org/apache/felix/logbackend/internal/LogbackLogListener.java (original)
+++ felix/trunk/logback/logback/src/main/java/org/apache/felix/logback/internal/LogbackLogListener.java Mon May 28 21:01:08 2018
@@ -12,7 +12,7 @@
  * limitations under the License.
  */
 
-package org.apache.felix.logbackend.internal;
+package org.apache.felix.logback.internal;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -37,6 +37,11 @@ import ch.qos.logback.classic.spi.Throwa
 
 public class LogbackLogListener implements LogListener, LoggerContextListener {
 
+    private static final String EVENTS_BUNDLE = "Events.Bundle";
+    private static final String EVENTS_FRAMEWORK = "Events.Framework";
+    private static final String EVENTS_SERVICE = "Events.Service";
+    private static final String LOG_SERVICE = "LogService";
+
     volatile LoggerContext loggerContext;
     volatile Logger rootLogger;
     volatile LoggerContextVO loggerContextVO;
@@ -53,13 +58,7 @@ public class LogbackLogListener implemen
             throw new IllegalStateException("This bundle only works with logback-classic");
         }
 
-        loggerContext = (LoggerContext)loggerFactory;
-        rootLogger = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME);
-        loggerContextVO = loggerContext.getLoggerContextRemoteView();
-
-        Map<String, LogLevel> updatedLevels = updateLevels(loggerContext, initialLogLevels);
-
-        osgiLoggerContext.setLogLevels(updatedLevels);
+        onStart((LoggerContext)loggerFactory);
 
         loggerContext.addListener(this);
     }
@@ -77,14 +76,14 @@ public class LogbackLogListener implemen
         Level level = from(entry.getLogLevel());
         final AtomicBoolean avoidCallerData = new AtomicBoolean();
 
-        if ("Events.Bundle".equals(loggerName) ||
-            "Events.Framework".equals(loggerName) ||
-            "LogService".equals(loggerName)) {
+        if (EVENTS_BUNDLE.equals(loggerName) ||
+            EVENTS_FRAMEWORK.equals(loggerName) ||
+            LOG_SERVICE.equals(loggerName)) {
 
             loggerName = formatBundle(entry.getBundle(), loggerName);
             avoidCallerData.set(true);
         }
-        else if ("Events.Service".equals(loggerName)) {
+        else if (EVENTS_SERVICE.equals(loggerName)) {
             loggerName = formatBundle(entry.getBundle(), loggerName);
             message = message + " {}";
             arguments = new Object[] {entry.getServiceReference()};
@@ -157,13 +156,7 @@ public class LogbackLogListener implemen
 
     @Override
     public void onReset(LoggerContext context) {
-        loggerContext = context;
-        rootLogger = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME);
-        loggerContextVO = loggerContext.getLoggerContextRemoteView();
-
-        Map<String, LogLevel> updatedLevels = updateLevels(loggerContext, initialLogLevels);
-
-        osgiLoggerContext.setLogLevels(updatedLevels);
+        onStart(context);
     }
 
     String formatBundle(Bundle bundle, String loggerName) {
@@ -217,10 +210,6 @@ public class LogbackLogListener implemen
         }
     }
 
-    /*
-    * TODO This method should be tuned with the correct packages and
-    * class names.
-    */
     StackTraceElement[] getCallerData0(StackTraceElement stackTraceElement) {
         StackTraceElement[] callerData = CallerData.extract(
             new Throwable(),
@@ -260,16 +249,23 @@ public class LogbackLogListener implemen
         Map<String, LogLevel> copy = new HashMap<String, LogLevel>(levels);
 
         Logger root = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME);
-        copy.put(org.osgi.service.log.Logger.ROOT_LOGGER_NAME, from(root.getLevel()));
+        LogLevel rootLevel = from(root.getLevel());
+        copy.put(org.osgi.service.log.Logger.ROOT_LOGGER_NAME, rootLevel);
+        copy.put(EVENTS_BUNDLE, LogLevel.TRACE);
+        copy.put(EVENTS_FRAMEWORK, LogLevel.TRACE);
+        copy.put(EVENTS_SERVICE, LogLevel.TRACE);
+        copy.put(LOG_SERVICE, LogLevel.TRACE);
 
         for (Logger logger : loggerContext.getLoggerList()) {
             String name = logger.getName();
             Level level = logger.getLevel();
 
-            copy.remove(name);
+            if (level != null) {
+                copy.remove(name);
 
-            if (level != Level.OFF) {
-                copy.put(name, from(level));
+                if (level != Level.OFF) {
+                    copy.put(name, from(level));
+                }
             }
         }
 

Copied: felix/trunk/logback/logback/src/main/resources/hookconfigurators.properties (from r1832252, felix/trunk/logbackend/src/main/resources/hookconfigurators.properties)
URL: http://svn.apache.org/viewvc/felix/trunk/logback/logback/src/main/resources/hookconfigurators.properties?p2=felix/trunk/logback/logback/src/main/resources/hookconfigurators.properties&p1=felix/trunk/logbackend/src/main/resources/hookconfigurators.properties&r1=1832252&r2=1832420&rev=1832420&view=diff
==============================================================================
--- felix/trunk/logbackend/src/main/resources/hookconfigurators.properties (original)
+++ felix/trunk/logback/logback/src/main/resources/hookconfigurators.properties Mon May 28 21:01:08 2018
@@ -12,4 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-hook.configurators=com.github.rotty3000.osgi.logback.EquinoxHookSupport
\ No newline at end of file
+hook.configurators=org.apache.felix.logback.internal.EquinoxHookSupport
\ No newline at end of file

Added: felix/trunk/logback/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/logback/pom.xml?rev=1832420&view=auto
==============================================================================
--- felix/trunk/logback/pom.xml (added)
+++ felix/trunk/logback/pom.xml Mon May 28 21:01:08 2018
@@ -0,0 +1,130 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>felix-parent</artifactId>
+        <version>4</version>
+        <relativePath>../pom/pom.xml</relativePath>
+    </parent>
+
+    <name>Apache Felix Logback Reactor</name>
+    <artifactId>org.apache.felix.logback.reactor</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/logback</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/logback</developerConnection>
+        <url>http://svn.apache.org/viewvc/felix/trunk/logback/</url>
+    </scm>
+
+    <properties>
+        <bnd.version>4.0.0</bnd.version>
+    </properties>
+
+    <modules>
+        <module>logback</module>
+        <module>itests</module>
+    </modules>
+
+    <build>
+        <defaultGoal>install</defaultGoal>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>biz.aQute.bnd</groupId>
+                    <artifactId>bnd-indexer-maven-plugin</artifactId>
+                    <version>${bnd.version}</version>
+                    <executions>
+                        <execution>
+                            <id>index</id>
+                            <goals>
+                                <goal>index</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>biz.aQute.bnd</groupId>
+                    <artifactId>bnd-maven-plugin</artifactId>
+                    <version>${bnd.version}</version>
+                    <executions>
+                        <execution>
+                            <id>bnd-process</id>
+                            <goals>
+                                <goal>bnd-process</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>biz.aQute.bnd</groupId>
+                    <artifactId>bnd-resolver-maven-plugin</artifactId>
+                    <version>${bnd.version}</version>
+                    <configuration>
+                        <includeOptional>false</includeOptional>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>resolve</id>
+                            <goals>
+                                <goal>resolve</goal>
+                            </goals>
+                            <phase>package</phase>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>biz.aQute.bnd</groupId>
+                    <artifactId>bnd-testing-maven-plugin</artifactId>
+                    <version>${bnd.version}</version>
+                    <executions>
+                        <execution>
+                            <id>testing</id>
+                            <goals>
+                                <goal>testing</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <configuration>
+                        <source>1.8</source>
+                        <target>1.8</target>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>3.0.1</version>
+                    <configuration>
+                        <archive>
+                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                        </archive>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>