Browse Source

take notice of verbosity flag when logging bug #39010

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@396453 13f79535-47bb-0310-9956-ffa450edef68
master
Kevin Jackson 19 years ago
parent
commit
e85fe6ce60
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java

+ 7
- 3
src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java View File

@@ -221,7 +221,9 @@ public class ScpToMessage extends AbstractSshMessage {
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 @@ public class ScpToMessage extends AbstractSshMessage {
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();
}
}


Loading…
Cancel
Save