aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-scheduler
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2013-11-07 05:23:08 +0000
committerOlivier Lamy <olamy@apache.org>2013-11-07 05:23:08 +0000
commitdbc237dc0336080737d326f95a46cf755efd9716 (patch)
treec0b18bb65bcc1d75eeade04b921aa185fbaef194 /archiva-modules/archiva-scheduler
parentdb38728d1211c76cc3444c3daf12206d2ae2e10c (diff)
downloadarchiva-dbc237dc0336080737d326f95a46cf755efd9716.tar.gz
archiva-dbc237dc0336080737d326f95a46cf755efd9716.zip
cleanup and fix logging
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1539524 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-scheduler')
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTask.java55
1 files changed, 1 insertions, 54 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 949263b61..37563cd83 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
@@ -278,59 +278,6 @@ public class DownloadRemoteIndexTask
}
}
- /*
- private static final class DownloadListener
- implements TransferListener
- {
- private Logger log = LoggerFactory.getLogger( getClass() );
-
- private String resourceName;
-
- private long startTime;
-
- private int totalLength = 0;
-
- public void transferInitiated( TransferEvent transferEvent )
- {
- startTime = System.currentTimeMillis();
- resourceName = transferEvent.getResource().getName();
- log.debug( "initiate transfer of {}", resourceName );
- }
-
- public void transferStarted( TransferEvent transferEvent )
- {
- this.totalLength = 0;
- resourceName = transferEvent.getResource().getName();
- log.info( "start transfer of {}", transferEvent.getResource().getName() );
- }
-
- public void transferProgress( TransferEvent transferEvent, byte[] buffer, int length )
- {
- log.debug( "transfer of {} : {}/{}", transferEvent.getResource().getName(), buffer.length, length );
- this.totalLength += length;
- }
-
- public void transferCompleted( TransferEvent transferEvent )
- {
- resourceName = transferEvent.getResource().getName();
- long endTime = System.currentTimeMillis();
- log.info( "end of transfer file {} {} kb: {}s", transferEvent.getResource().getName(),
- this.totalLength / 1024, ( endTime - startTime ) / 1000 );
- }
-
- public void transferError( TransferEvent transferEvent )
- {
- log.info( "error of transfer file {}: {}", transferEvent.getResource().getName(),
- transferEvent.getException().getMessage(), transferEvent.getException() );
- }
-
- public void debug( String message )
- {
- log.debug( "transfer debug {}", message );
- }
- }
- */
-
private static class ZeroCopyConsumerListener
extends ZeroCopyConsumer
{
@@ -388,7 +335,7 @@ public class DownloadRemoteIndexTask
this.startTime = System.currentTimeMillis();
super.onResponseReceived( response );
this.totalLength = response.getEntity().getContentLength();
- log.info( "start transfer of {}, contentLength: {}", resourceName, this.totalLength );
+ log.info( "start transfer of {}, contentLength: {}", resourceName, this.totalLength / 1024 );
}
@Override