diff --git a/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java b/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java index af9dd4d1c..b2c34684d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java +++ b/src/main/org/apache/tools/ant/taskdefs/LogOutputStream.java @@ -37,6 +37,16 @@ public class LogOutputStream extends LineOrientedOutputStream { private ProjectComponent pc; private int level = Project.MSG_INFO; + /** + * Create a new LogOutputStream for the specified ProjectComponent. + * + * @param pc the project component for whom to log + * @since Ant 1.7.1 + */ + public LogOutputStream(ProjectComponent pc) { + this.pc = pc; + } + /** * Creates a new instance of this class. * @@ -55,7 +65,7 @@ public class LogOutputStream extends LineOrientedOutputStream { * @since Ant 1.6.3 */ public LogOutputStream(ProjectComponent pc, int level) { - this.pc = pc; + this(pc); this.level = level; }