Browse Source

Route log messages to the subproject in <ant> and <antcall> situations

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269372 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
e32249e2cb
2 changed files with 37 additions and 0 deletions
  1. +18
    -0
      src/main/org/apache/tools/ant/taskdefs/Ant.java
  2. +19
    -0
      src/main/org/apache/tools/ant/taskdefs/CallTarget.java

+ 18
- 0
src/main/org/apache/tools/ant/taskdefs/Ant.java View File

@@ -179,6 +179,24 @@ public class Ant extends Task {
}
}

protected void handleOutput(String line) {
if (p1 != null) {
p1.demuxOutput(line, false);
}
else {
super.handleOutput(line);
}
}
protected void handleErrorOutput(String line) {
if (p1 != null) {
p1.demuxOutput(line, true);
}
else {
super.handleErrorOutput(line);
}
}
/**
* Do the execution.
*/


+ 19
- 0
src/main/org/apache/tools/ant/taskdefs/CallTarget.java View File

@@ -127,4 +127,23 @@ public class CallTarget extends Task {
public void setTarget(String target) {
subTarget = target;
}

protected void handleOutput(String line) {
if (callee != null) {
callee.handleOutput(line);
}
else {
super.handleOutput(line);
}
}
protected void handleErrorOutput(String line) {
if (callee != null) {
callee.handleErrorOutput(line);
}
else {
super.handleErrorOutput(line);
}
}
}

Loading…
Cancel
Save