aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rotty3...@apache.org
Subject [1/2] aries-jax-rs-whiteboard git commit: better logging configration
Date Fri, 30 Jun 2017 23:09:26 GMT
Repository: aries-jax-rs-whiteboard
Updated Branches:
  refs/heads/master 688485b72 -> 7a47410aa


better logging configration

Signed-off-by: Raymond Augé <rotty3000@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/commit/ca89490c
Tree: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/tree/ca89490c
Diff: http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/diff/ca89490c

Branch: refs/heads/master
Commit: ca89490c3e366c2b36afe913f88b4c8ed81419b9
Parents: 688485b
Author: Raymond Augé <rotty3000@apache.org>
Authored: Fri Jun 30 14:43:28 2017 -0400
Committer: Raymond Augé <rotty3000@apache.org>
Committed: Fri Jun 30 14:48:08 2017 -0400

----------------------------------------------------------------------
 jax-rs.example/augments.bnd     | 77 ------------------------------------
 jax-rs.example/example.bndrun   | 12 +++---
 jax-rs.example/log4j.properties |  9 -----
 jax-rs.example/logback.xml      | 15 +++++++
 jax-rs.example/pom.xml          | 15 +++----
 jax-rs.itests/itest.bndrun      | 12 +++---
 jax-rs.itests/log4j.properties  |  9 -----
 jax-rs.itests/logback.xml       | 15 +++++++
 jax-rs.itests/pom.xml           | 15 +++----
 9 files changed, 52 insertions(+), 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.example/augments.bnd
----------------------------------------------------------------------
diff --git a/jax-rs.example/augments.bnd b/jax-rs.example/augments.bnd
deleted file mode 100644
index aa1cca1..0000000
--- a/jax-rs.example/augments.bnd
+++ /dev/null
@@ -1,77 +0,0 @@
--augment.javax.servlet-api: \
-	javax.servlet-api; \
-		requirement:="osgi.implementation;filter:='(osgi.implementation=osgi.http)'"
-
--augment.javax.ws.rs-api: \
-	javax.ws.rs-api; \
-		requirement:="osgi.implementation;filter:='(osgi.implementation=aries.jax-rs)'"
-
--augment.org.apache.commons.fileupload: \
-	org.apache.commons.fileupload; \
-		capability:=" generic.dependency;generic.dependency='commons.fileupload'"
-
--augment.org.apache.felix.gogo.command: \
-	org.apache.felix.gogo.command; \
-		capability:=" generic.dependency;generic.dependency='gogo.shell.command';version:Version='1.0.0'";
\
-		version='1.0.0'
-
--augment.org.apache.felix.gogo.shell: \
-	org.apache.felix.gogo.shell; \
-		capability:=" osgi.implementation;osgi.implementation='gogo.shell';version:Version='1.0.0'";
\
-		requirement:="generic.dependency;filter:='(generic.dependency=gogo.shell.command)';effective:=active";
\
-		version='1.0.0'
-
--augment.org.apache.felix.gogo.jline: \
-	org.apache.felix.gogo.jline; \
-		capability:=" osgi.implementation;osgi.implementation='gogo.jline';version:Version='1.0.0'";
\
-		requirement:="generic.dependency;filter:='(generic.dependency=gogo.shell.command)';effective:=active";
\
-		version='1.0.0'
-
--augment.org.apache.felix.log: \
-	org.apache.felix.log; \
-		capability:=" osgi.implementation;osgi.implementation=osgi.log"
-
--augment.org.apache.felix.scr: \
-	org.apache.felix.scr; \
-		requirement:="osgi.implementation;filter:='(osgi.implementation=osgi.metatype)'"
-
--augment.org.eclipse.equinox.coordinator: \
-	org.eclipse.equinox.coordinator; \
-		capability:=" osgi.service;objectClass=org.osgi.service.coordinator.Coordinator;effective:=active,
\
-		              osgi.implementation;osgi.implementation=osgi.coordinator"
-
--augment.org.eclipse.equinox.event: \
-	org.eclipse.equinox.event; \
-		capability:=" osgi.service;objectClass=org.osgi.service.event.EventAdmin;effective:=active,
\
-					  osgi.implementation;osgi.implementation=osgi.event"; \
-		requirement:="osgi.extender;filter:='(osgi.extender=osgi.component)'"
-
--augment.org.eclipse.equinox.http.jetty: \
-	org.eclipse.equinox.http.jetty; \
-		capability:=" equinox.module.data;activation.policy=eager, \
-					  generic.dependency;generic.dependency='osgi.servlet.container';version:Version='1.0.0'"
-
--augment.org.eclipse.equinox.http.servlet: \
-	org.eclipse.equinox.http.servlet; \
-		capability:=" equinox.module.data;activation.policy=eager"; \
-		requirement:="generic.dependency;filter:='(generic.dependency=commons.fileupload)';effective:=active,\
-		              generic.dependency;filter:='(generic.dependency=osgi.servlet.container)';effective:=active"
-
--augment.org.knopflerfish.bundle.useradmin: \
-	org.knopflerfish.bundle.useradmin; \
-		capability:=" osgi.service;objectClass:List<String>=org.osgi.service.useradmin.UserAdmin;effective:=active,
\
-					  osgi.implementation;osgi.implementation=osgi.useradmin"
-
--augment.org.osgi.service.event: \
-	org.osgi.service.event; \
-		requirement:="osgi.implementation;filter:='(osgi.implementation=osgi.event)'"
-
--augment.org.osgi.service.metatype: \
-	org.osgi.service.metatype; \
-		requirement:="osgi.implementation;filter:='(osgi.implementation=osgi.metatype)'"
-
--augment.org.osgi.service.remoteserviceadmin: \
-	org.osgi.service.remoteserviceadmin; \
-		requirement:="osgi.remoteserviceadmin.distribution;filter:='(configs=*)', \
-		              osgi.remoteserviceadmin.topology;filter:='(policy=*)', \
-		              osgi.remoteserviceadmin.discovery;filter:='(protocols=*)'"

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.example/example.bndrun
----------------------------------------------------------------------
diff --git a/jax-rs.example/example.bndrun b/jax-rs.example/example.bndrun
index 4a0a84a..18178e0 100644
--- a/jax-rs.example/example.bndrun
+++ b/jax-rs.example/example.bndrun
@@ -1,5 +1,4 @@
 -standalone: ${.}/target/index.xml
-#-include: ${.}/augments.bnd
 -resourceonly: true
 
 -runrequires: \
@@ -7,14 +6,14 @@
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.whiteboard)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.jline)',\
-	osgi.identity;filter:='(osgi.identity=slf4j.log4j12)'
+	osgi.identity;filter:='(osgi.identity=ch.qos.logback.classic)'
 
 -runfw: org.eclipse.osgi;version='[3.10.100.v20150529-1857,3.10.100.v20150529-1857]'
 
 -runee: JavaSE-1.8
 -resolve.effective: resolve, active
 -runproperties: \
-	log4j.configuration=file:${.}/log4j.properties,\
+	logback.configurationFile=file:${.}/logback.xml,\
 	osgi.console.enable.builtin=false, \
 	osgi.console=, \
 	org.osgi.service.http.port=8080
@@ -24,9 +23,11 @@
 	osgi.identity;filter:='(osgi.identity=osgi.cmpn)'
 
 -runbundles: \
+	ch.qos.logback.classic;version='[1.2.3,1.2.4)',\
+	ch.qos.logback.core;version='[1.2.3,1.2.4)',\
 	javax.annotation-api;version='[1.2.0,1.2.1)',\
 	javax.json-api;version='[1.0.0,1.0.1)',\
-	log4j;version='[1.2.17,1.2.18)',\
+	log4j.over.slf4j;version='[1.7.25,1.7.26)',\
 	org.apache.aries.jax.rs.example;version='[0.0.1,0.0.2)',\
 	org.apache.aries.jax.rs.jaxrs.api;version='[0.0.1,0.0.2)',\
 	org.apache.aries.jax.rs.whiteboard;version='[0.0.1,0.0.2)',\
@@ -45,5 +46,4 @@
 	org.osgi.service.jaxrs;version='[1.0.0,1.0.1)',\
 	org.osgi.util.function;version='[1.1.0,1.1.1)',\
 	org.osgi.util.promise;version='[1.1.0,1.1.1)',\
-	slf4j.api;version='[1.7.21,1.7.22)',\
-	slf4j.log4j12;version='[1.6.1,1.6.2)'
+	slf4j.api;version='[1.7.25,1.7.26)'

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.example/log4j.properties
----------------------------------------------------------------------
diff --git a/jax-rs.example/log4j.properties b/jax-rs.example/log4j.properties
deleted file mode 100644
index a136842..0000000
--- a/jax-rs.example/log4j.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-# Set root logger level to DEBUG and its only appender to A1.
-log4j.rootLogger=ERROR, A1
-
-# A1 is set to be a ConsoleAppender.
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.example/logback.xml
----------------------------------------------------------------------
diff --git a/jax-rs.example/logback.xml b/jax-rs.example/logback.xml
new file mode 100644
index 0000000..1952216
--- /dev/null
+++ b/jax-rs.example/logback.xml
@@ -0,0 +1,15 @@
+<configuration>
+  <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} [%thread] %-5level %logger{36} - %msg%n</pattern>
+    </encoder>
+  </appender>
+
+  <root level="error">
+    <appender-ref ref="STDOUT" />
+  </root>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.example/pom.xml
----------------------------------------------------------------------
diff --git a/jax-rs.example/pom.xml b/jax-rs.example/pom.xml
index 128f20f..c33ff7e 100644
--- a/jax-rs.example/pom.xml
+++ b/jax-rs.example/pom.xml
@@ -68,19 +68,14 @@
     </build>
     <dependencies>
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.17</version>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>1.2.3</version>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>1.7.21</version>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>1.6.1</version>
+            <artifactId>log4j-over-slf4j</artifactId>
+            <version>1.7.25</version>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.itests/itest.bndrun
----------------------------------------------------------------------
diff --git a/jax-rs.itests/itest.bndrun b/jax-rs.itests/itest.bndrun
index 6a3bcea..5d5106b 100644
--- a/jax-rs.itests/itest.bndrun
+++ b/jax-rs.itests/itest.bndrun
@@ -3,7 +3,7 @@
 -runrequires: \
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.itests)',\
 	osgi.identity;filter:='(osgi.identity=org.apache.aries.jax.rs.whiteboard)',\
-	osgi.identity;filter:='(osgi.identity=slf4j.log4j12)'
+	osgi.identity;filter:='(osgi.identity=ch.qos.logback.classic)'
 
 -runfw: org.eclipse.osgi;version='[3.10.100.v20150529-1857,3.10.100.v20150529-1857]'
 
@@ -14,7 +14,7 @@
 
 -runsystemcapabilities: ${native_capability}
 -runproperties: \
-	log4j.configuration=file:${.}/log4j.properties,\
+	logback.configurationFile=file:${.}/logback.xml,\
 	osgi.console.enable.builtin=false, \
 	osgi.console=, \
 	org.osgi.service.http.port=8080
@@ -22,9 +22,11 @@
 	osgi.identity;filter:='(osgi.identity=org.osgi.compendium)',\
 	osgi.identity;filter:='(osgi.identity=osgi.cmpn)'
 -runbundles: \
+	ch.qos.logback.classic;version='[1.2.3,1.2.4)',\
+	ch.qos.logback.core;version='[1.2.3,1.2.4)',\
 	javax.annotation-api;version='[1.2.0,1.2.1)',\
 	javax.json-api;version='[1.0.0,1.0.1)',\
-	log4j;version='[1.2.17,1.2.18)',\
+	log4j.over.slf4j;version='[1.7.25,1.7.26)',\
 	org.apache.aries.jax.rs.itests;version='[0.0.1,0.0.2)',\
 	org.apache.aries.jax.rs.jaxrs.api;version='[0.0.1,0.0.2)',\
 	org.apache.aries.jax.rs.whiteboard;version='[0.0.1,0.0.2)',\
@@ -34,13 +36,11 @@
 	org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
 	org.apache.ws.xmlschema.core;version='[2.2.1,2.2.2)',\
 	org.objectweb.asm;version='[5.0.4,5.0.5)',\
-	org.osgi.service.http;version='[1.2.1,1.2.2)',\
 	org.osgi.service.jaxrs;version='[1.0.0,1.0.1)',\
 	org.osgi.util.function;version='[1.1.0,1.1.1)',\
 	org.osgi.util.promise;version='[1.1.0,1.1.1)',\
 	osgi.enroute.hamcrest.wrapper;version='[1.3.0,1.3.1)',\
 	osgi.enroute.junit.wrapper;version='[4.12.0,4.12.1)',\
-	slf4j.api;version='[1.7.21,1.7.22)',\
-	slf4j.log4j12;version='[1.6.1,1.6.2)'
+	slf4j.api;version='[1.7.25,1.7.26)'
 
 #-runvm: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.itests/log4j.properties
----------------------------------------------------------------------
diff --git a/jax-rs.itests/log4j.properties b/jax-rs.itests/log4j.properties
deleted file mode 100644
index a136842..0000000
--- a/jax-rs.itests/log4j.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-# Set root logger level to DEBUG and its only appender to A1.
-log4j.rootLogger=ERROR, A1
-
-# A1 is set to be a ConsoleAppender.
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.itests/logback.xml
----------------------------------------------------------------------
diff --git a/jax-rs.itests/logback.xml b/jax-rs.itests/logback.xml
new file mode 100644
index 0000000..1952216
--- /dev/null
+++ b/jax-rs.itests/logback.xml
@@ -0,0 +1,15 @@
+<configuration>
+  <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} [%thread] %-5level %logger{36} - %msg%n</pattern>
+    </encoder>
+  </appender>
+
+  <root level="error">
+    <appender-ref ref="STDOUT" />
+  </root>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/aries-jax-rs-whiteboard/blob/ca89490c/jax-rs.itests/pom.xml
----------------------------------------------------------------------
diff --git a/jax-rs.itests/pom.xml b/jax-rs.itests/pom.xml
index 0648798..8d94f57 100644
--- a/jax-rs.itests/pom.xml
+++ b/jax-rs.itests/pom.xml
@@ -71,19 +71,14 @@
     </build>
     <dependencies>
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.17</version>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>1.2.3</version>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>1.7.21</version>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>1.6.1</version>
+            <artifactId>log4j-over-slf4j</artifactId>
+            <version>1.7.25</version>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>


Mime
View raw message