git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1580482 13f79535-47bb-0310-9956-ffa450edef68master
@@ -140,6 +140,10 @@ Other changes: | |||||
have different base directories. | have different base directories. | ||||
Bugzilla Report 48621 | Bugzilla Report 48621 | ||||
* <get> has a quiet attribute that makes the task log errors only | |||||
when enabled. | |||||
GitHub Pull Request #1 | |||||
Changes from Ant 1.9.2 TO Ant 1.9.3 | Changes from Ant 1.9.2 TO Ant 1.9.3 | ||||
=================================== | =================================== | ||||
@@ -71,6 +71,11 @@ plain text' authentication is used. This is only secure over an HTTPS link. | |||||
<td valign="top">show verbose progress information ("on"/"off").</td> | <td valign="top">show verbose progress information ("on"/"off").</td> | ||||
<td align="center" valign="top">No; default "false"</td> | <td align="center" valign="top">No; default "false"</td> | ||||
</tr> | </tr> | ||||
<tr> | |||||
<td valign="top">quiet</td> | |||||
<td valign="top">Log errors only.("true"/"false").</td> | |||||
<td align="center" valign="top">No; default "false"</td> | |||||
</tr> | |||||
<tr> | <tr> | ||||
<td valign="top">ignoreerrors</td> | <td valign="top">ignoreerrors</td> | ||||
<td valign="top">Log errors but don't treat as fatal.</td> | <td valign="top">Log errors but don't treat as fatal.</td> | ||||
@@ -74,6 +74,7 @@ public class Get extends Task { | |||||
private Resources sources = new Resources(); | private Resources sources = new Resources(); | ||||
private File destination; // required | private File destination; // required | ||||
private boolean verbose = false; | private boolean verbose = false; | ||||
private boolean quiet = false; | |||||
private boolean useTimestamp = false; //off by default | private boolean useTimestamp = false; //off by default | ||||
private boolean ignoreErrors = false; | private boolean ignoreErrors = false; | ||||
private String uname = null; | private String uname = null; | ||||
@@ -253,6 +254,13 @@ public class Get extends Task { | |||||
return getThread.wasSuccessful(); | return getThread.wasSuccessful(); | ||||
} | } | ||||
@Override | |||||
public void log(String msg, int msgLevel) { | |||||
if (!quiet || msgLevel >= Project.MSG_ERR) { | |||||
super.log(msg, msgLevel); | |||||
} | |||||
} | |||||
/** | /** | ||||
* Check the attributes. | * Check the attributes. | ||||
*/ | */ | ||||
@@ -331,6 +339,16 @@ public class Get extends Task { | |||||
verbose = v; | verbose = v; | ||||
} | } | ||||
/** | |||||
* If true, set default log level to Project.MSG_ERR. | |||||
* | |||||
* @param v if "true" then be quiet | |||||
* @since Ant 1.9.4 | |||||
*/ | |||||
public void setQuiet(boolean v){ | |||||
this.quiet = v; | |||||
} | |||||
/** | /** | ||||
* If true, log errors but do not treat as fatal. | * If true, log errors but do not treat as fatal. | ||||
* | * | ||||