ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r396453 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java
Date Mon, 24 Apr 2006 06:39:53 GMT
Author: kevj
Date: Sun Apr 23 23:39:52 2006
New Revision: 396453

URL: http://svn.apache.org/viewcvs?rev=396453&view=rev
Log:
take notice of verbosity flag when logging bug #39010

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java?rev=396453&r1=396452&r2=396453&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java Sun
Apr 23 23:39:52 2006
@@ -221,7 +221,9 @@
         int percentTransmitted = 0;
 
         try {
-            log("Sending: " + localFile.getName() + " : " + localFile.length());
+            if (this.getVerbose()) {
+                log("Sending: " + localFile.getName() + " : " + localFile.length());
+            }
             while (true) {
                 int len = fis.read(buf, 0, buf.length);
                 if (len <= 0) {
@@ -240,8 +242,10 @@
             sendAck(out);
             waitForAck(in);
         } finally {
-            long endTime = System.currentTimeMillis();
-            logStats(startTime, endTime, totalLength);
+            if (this.getVerbose()) {
+                long endTime = System.currentTimeMillis();
+                logStats(startTime, endTime, totalLength);
+            }
             fis.close();
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message