aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-policies
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2009-03-14 02:33:57 +0000
committerBrett Porter <brett@apache.org>2009-03-14 02:33:57 +0000
commit537ff689e7e39ce7ca4d9f0b94abcece5ee7c569 (patch)
treed905efd2f35bab56d08c436288943c77820b63e2 /archiva-modules/archiva-base/archiva-policies
parentb24700028788de56ab0367f1c2379f0b695e4c0f (diff)
downloadarchiva-537ff689e7e39ce7ca4d9f0b94abcece5ee7c569.tar.gz
archiva-537ff689e7e39ce7ca4d9f0b94abcece5ee7c569.zip
[MRM-1140] centralise logging through slf4j
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@753590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-policies')
-rw-r--r--archiva-modules/archiva-base/archiva-policies/pom.xml10
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java7
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java6
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml55
4 files changed, 17 insertions, 61 deletions
diff --git a/archiva-modules/archiva-base/archiva-policies/pom.xml b/archiva-modules/archiva-base/archiva-policies/pom.xml
index 0e8c2e01e..ac5f13f09 100644
--- a/archiva-modules/archiva-base/archiva-policies/pom.xml
+++ b/archiva-modules/archiva-base/archiva-policies/pom.xml
@@ -49,6 +49,16 @@
<groupId>org.codehaus.plexus.cache</groupId>
<artifactId>plexus-cache-ehcache</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java
index cca1c6750..76b688f21 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java
@@ -21,6 +21,8 @@ package org.apache.maven.archiva.policies;
import org.apache.commons.lang.StringUtils;
import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.ArrayList;
@@ -35,9 +37,10 @@ import java.util.Properties;
* role-hint="propagate-errors"
*/
public class PropagateErrorsDownloadPolicy
- extends AbstractLogEnabled
implements DownloadErrorPolicy
{
+ private Logger log = LoggerFactory.getLogger( PropagateErrorsDownloadPolicy.class );
+
/**
* Signifies any error should stop searching for other proxies.
*/
@@ -76,7 +79,7 @@ public class PropagateErrorsDownloadPolicy
if ( IGNORE.equals( policySetting ) )
{
// Ignore.
- getLogger().debug( "Error policy set to IGNORE." );
+ log.debug( "Error policy set to IGNORE." );
return false;
}
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
index d2b471af3..9e20ba524 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
@@ -19,15 +19,14 @@ package org.apache.maven.archiva.policies;
* under the License.
*/
-import org.apache.commons.lang.StringUtils;
-import org.codehaus.plexus.logging.AbstractLogEnabled;
-
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import org.apache.commons.lang.StringUtils;
+
/**
* PropagateErrorsPolicy - a policy applied on error to determine how to treat the error.
*
@@ -35,7 +34,6 @@ import java.util.Properties;
* role-hint="propagate-errors-on-update"
*/
public class PropagateErrorsOnUpdateDownloadPolicy
- extends AbstractLogEnabled
implements DownloadErrorPolicy
{
/**
diff --git a/archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml
deleted file mode 100644
index 9bb5e1e5a..000000000
--- a/archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%5p|%t|%5r|%-30c{1} - %m%n"/>
- </layout>
- </appender>
-
- <!-- Help identify bugs during testing -->
- <logger name="org.apache.maven.archiva">
- <level value="debug"/>
- </logger>
-
- <logger name="org.codehaus.plexus.security">
- <level value="info"/>
- </logger>
-
- <logger name="org.codehaus.plexus.PlexusContainer">
- <level value="info"/>
- </logger>
-
- <logger name="JPOX">
- <level value="warn"/>
- </logger>
-
- <logger name="JPOX.MetaData">
- <level value="error"/>
- </logger>
-
- <logger name="JPOX.RDBMS.SQL">
- <level value="error"/>
- </logger>
-
- <logger name="SQL">
- <level value="error"/>
- </logger>
-
- <logger name="org.codehaus.plexus.spring">
- <level value="warn"/>
- </logger>
-
- <logger name="org.springframework">
- <level value="warn"/>
- </logger>
-
- <root>
- <priority value ="info" />
- <appender-ref ref="console" />
- </root>
-
-</log4j:configuration>