continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r713586 - in /continuum/branches/continuum-1.2.x/continuum-purge/src/main: java/org/apache/continuum/purge/executor/AbstractContinuumPurgeExecutor.java resources/log4j.xml
Date Thu, 13 Nov 2008 00:49:31 GMT
Author: ctan
Date: Wed Nov 12 16:49:30 2008
New Revision: 713586

URL: http://svn.apache.org/viewvc?rev=713586&view=rev
Log:
[CONTINUUM-1973] add log for purging

Added:
    continuum/branches/continuum-1.2.x/continuum-purge/src/main/resources/log4j.xml
Modified:
    continuum/branches/continuum-1.2.x/continuum-purge/src/main/java/org/apache/continuum/purge/executor/AbstractContinuumPurgeExecutor.java

Modified: continuum/branches/continuum-1.2.x/continuum-purge/src/main/java/org/apache/continuum/purge/executor/AbstractContinuumPurgeExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.2.x/continuum-purge/src/main/java/org/apache/continuum/purge/executor/AbstractContinuumPurgeExecutor.java?rev=713586&r1=713585&r2=713586&view=diff
==============================================================================
--- continuum/branches/continuum-1.2.x/continuum-purge/src/main/java/org/apache/continuum/purge/executor/AbstractContinuumPurgeExecutor.java
(original)
+++ continuum/branches/continuum-1.2.x/continuum-purge/src/main/java/org/apache/continuum/purge/executor/AbstractContinuumPurgeExecutor.java
Wed Nov 12 16:49:30 2008
@@ -22,6 +22,8 @@
 import org.apache.continuum.purge.repository.content.RepositoryManagedContent;
 import org.apache.maven.archiva.consumers.core.repository.ArtifactFilenameFilter;
 import org.apache.maven.archiva.model.ArtifactReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.io.FilenameFilter;
@@ -35,6 +37,8 @@
 public abstract class AbstractContinuumPurgeExecutor
     implements ContinuumPurgeExecutor
 {
+    private Logger log = LoggerFactory.getLogger( AbstractContinuumPurgeExecutor.class );
+    
     public void purge( Set<ArtifactReference> references, RepositoryManagedContent
repository )
     {
         if ( references != null && !references.isEmpty() )
@@ -43,6 +47,7 @@
             {
                 File artifactFile = repository.toFile( reference );
                 artifactFile.delete();
+                log.info( "Purge artifact " + artifactFile.getName() );
                 purgeSupportFiles( artifactFile, artifactFile.getName() );
                 // purge maven metadata
                 purgeSupportFiles( artifactFile.getParentFile(), "maven-metadata" );
@@ -78,6 +83,7 @@
             if ( file.exists() && file.isFile() )
             {
                 file.delete();
+                log.info( "Purge support file: " + file.getName() );
             }
         }
     }

Added: continuum/branches/continuum-1.2.x/continuum-purge/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.2.x/continuum-purge/src/main/resources/log4j.xml?rev=713586&view=auto
==============================================================================
--- continuum/branches/continuum-1.2.x/continuum-purge/src/main/resources/log4j.xml (added)
+++ continuum/branches/continuum-1.2.x/continuum-purge/src/main/resources/log4j.xml Wed Nov
12 16:49:30 2008
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<!-- ===================================================================== -->
+<!-- Log4j Configuration -->
+<!-- ===================================================================== -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
+  debug="false">
+
+  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+    <param name="Target" value="System.out"/>
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}.%M](%L) %m%n"/>
+    </layout>
+  </appender>
+
+  <!-- quiet spring loading :-) -->
+  <category name="org.springframework">
+    <priority value="ERROR"/>
+  </category>
+  <category name="org.codehaus.plexus">
+    <priority value="ERROR"/>
+  </category>
+  
+  <category name="org.apache.commons">
+    <priority value="ERROR"/>
+  </category>  
+
+  <!-- JPOX -->
+  <category name="JPOX">
+    <priority value="WARN"/>
+  </category>
+  <category name="JPOX.RDBMS">
+    <priority value="ERROR"/>
+  </category>
+
+  <root>
+    <priority value="INFO"/>
+    <appender-ref ref="CONSOLE"/>
+  </root>
+
+</log4j:configuration>
\ No newline at end of file



Mime
View raw message