diff options
author | Olivier Lamy <olamy@apache.org> | 2011-09-26 20:35:59 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-09-26 20:35:59 +0000 |
commit | ae7be0e0490495d869881e2e95b4a549e2cfdce3 (patch) | |
tree | 833dc5c6a4fabebebe9a663c6011f396a87b05ef /archiva-modules/archiva-scheduler/archiva-scheduler-indexing | |
parent | d9c293217ca6b53bf57e1a1c0e66d51d8ad89268 (diff) | |
download | archiva-ae7be0e0490495d869881e2e95b4a549e2cfdce3.tar.gz archiva-ae7be0e0490495d869881e2e95b4a549e2cfdce3.zip |
better output of the transferListener for remote index download
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1176041 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-scheduler/archiva-scheduler-indexing')
-rw-r--r-- | archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java index c4b3e3511..5e8bc5d8f 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java @@ -271,14 +271,21 @@ public class DownloadRemoteIndexTask { private Logger log = LoggerFactory.getLogger( getClass() ); + String reourceName; + + long startTime; + public void transferInitiated( TransferEvent transferEvent ) { - log.debug( "initiate transfer of {}", transferEvent.getResource().getName() ); + reourceName = transferEvent.getResource().getName(); + log.debug( "initiate transfer of {}", reourceName ); } public void transferStarted( TransferEvent transferEvent ) { - log.debug( "start transfer of {}", transferEvent.getResource().getName() ); + reourceName = transferEvent.getResource().getName(); + startTime = System.currentTimeMillis(); + log.info( "start transfer of {}", transferEvent.getResource().getName() ); } public void transferProgress( TransferEvent transferEvent, byte[] buffer, int length ) @@ -289,7 +296,10 @@ public class DownloadRemoteIndexTask public void transferCompleted( TransferEvent transferEvent ) { - log.info( "end of transfer file " + transferEvent.getResource().getName() ); + reourceName = transferEvent.getResource().getName(); + long endTime = System.currentTimeMillis(); + log.info( "end of transfer file {}: {}s", transferEvent.getResource().getName(), + ( endTime - startTime ) / 1000 ); } public void transferError( TransferEvent transferEvent ) |