]> source.dussan.org Git - archiva.git/commitdiff
add log info on maven repository indexing
authorOlivier Lamy <olamy@apache.org>
Thu, 19 Jan 2012 10:09:21 +0000 (10:09 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 19 Jan 2012 10:09:21 +0000 (10:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233265 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java

index fc1ef03f94b827941ece2399b62c2dd6b436bb11..2b9bba5f5255935c65fa18d0bc22512b45e7904b 100644 (file)
@@ -50,6 +50,7 @@ import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 import java.io.File;
 import java.io.IOException;
+import java.util.Arrays;
 
 /**
  * ArchivaIndexingTaskExecutor Executes all indexing tasks. Adding, updating and removing artifacts from the index are
@@ -104,7 +105,12 @@ public class ArchivaIndexingTaskExecutor
         {
             try
             {
+                long start = System.currentTimeMillis();
                 nexusIndexer.scan( context, null, indexingTask.isOnlyUpdate() );
+                long end = System.currentTimeMillis();
+                log.info( "indexed maven repository: {}, onlyUpdate: {}, time {} ms",
+                          Arrays.asList( repository.getId(), indexingTask.isOnlyUpdate(), ( end - start ) ).toArray(
+                              new Object[3] ) );
             }
             catch ( IOException e )
             {