Browse Source

Corrected fix in Task.java (first shortcut removed the task name from the logging entry.) Used patch of Andreas Mross.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@374488 13f79535-47bb-0310-9956-ffa450edef68
master
Jacobus Martinus Kruithof 19 years ago
parent
commit
a6d7afa668
2 changed files with 17 additions and 0 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +16
    -0
      src/main/org/apache/tools/ant/Task.java

+ 1
- 0
CONTRIBUTORS View File

@@ -2,6 +2,7 @@ Amongst other, the following people contributed to ant:

Aleksandr Ishutin
Andreas Ames
Andreas Mross
Andrew Everitt
Anil K. Vijendran
Anli Shundi


+ 16
- 0
src/main/org/apache/tools/ant/Task.java View File

@@ -335,6 +335,22 @@ public abstract class Task extends ProjectComponent {
log(msg, Project.MSG_INFO);
}

/**
* Logs a message with the given priority. This delegates
* the actual logging to the project.
*
* @param msg The message to be logged. Should not be <code>null</code>.
* @param msgLevel The message priority at which this message is to
* be logged.
*/
public void log(String msg, int msgLevel) {
if (getProject() != null) {
getProject().log(this, msg, msgLevel);
} else {
super.log(msg, msgLevel);
}
}

/**
* Performs this task if it's still valid, or gets a replacement
* version and performs that otherwise.


Loading…
Cancel
Save