Mercurial > dive4elements > framework
changeset 83:8c4638abd518
Installed a SLF4J bridge to route incoming jul logs (used by restlet) to log4j.
artifacts/trunk@820 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 22 Mar 2010 15:54:06 +0000 |
parents | efe752c4f8b2 |
children | 72e2dd4feb31 |
files | ChangeLog artifact-database/pom.xml artifact-database/src/main/java/de/intevation/artifactdatabase/App.java |
diffstat | 3 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Mar 22 09:03:30 2010 +0000 +++ b/ChangeLog Mon Mar 22 15:54:06 2010 +0000 @@ -1,3 +1,12 @@ +2010-03-22 Ingo Weinzierl <ingo.weinzierl@intevation.de> + + * artifact-database/src/main/java/de/intevation/artifactdatabase/App.java: + Install a SLF4JBridgeHandler after logging is configured. This handler is + used to route incoming java.util.logging logs to SLF4J. In our case, we + route this incoming log to our log4j logger. + + * artifact-database/pom.xml: Added dependencies for SLF4J 1.5.11. + 2010-03-22 Ingo Weinzierl <ingo.weinzierl@intevation.de> Issue208 (Remove special data of an 'out'-target before exporting
--- a/artifact-database/pom.xml Mon Mar 22 09:03:30 2010 +0000 +++ b/artifact-database/pom.xml Mon Mar 22 15:54:06 2010 +0000 @@ -84,5 +84,15 @@ <artifactId>log4j</artifactId> <version>1.2.14</version> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jul-to-slf4j</artifactId> + <version>1.5.11</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.5.11</version> + </dependency> </dependencies> </project>
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/App.java Mon Mar 22 09:03:30 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/App.java Mon Mar 22 15:54:06 2010 +0000 @@ -8,6 +8,9 @@ import org.apache.log4j.PropertyConfigurator; +import org.slf4j.bridge.SLF4JBridgeHandler; + + /** * Starting point of the artifact database. * @@ -25,6 +28,7 @@ if (propFile.isFile() && propFile.canRead()) { try { PropertyConfigurator.configure(propFile.toURI().toURL()); + SLF4JBridgeHandler.install(); } catch (MalformedURLException mue) { mue.printStackTrace(System.err);