if (out == null && outputProperty == null) {
outputStream = new LogOutputStream(managingTask, Project.MSG_INFO);
errorStream = new LogOutputStream(managingTask, Project.MSG_WARN);
} else {
if (out != null) {
outputStream = new LazyFileOutputStream(out, append);
managingTask.log("Output redirected to " + out,
Project.MSG_VERBOSE);
}
if (outputProperty != null) {
baos = new ByteArrayOutputStream();
managingTask.log("Output redirected to property: "
+ outputProperty, Project.MSG_VERBOSE);
if (out == null) {
outputStream = baos;
} else {
outputStream = new TeeOutputStream(outputStream, baos);
}
} else {
baos = null;
}
errorStream = outputStream;
}
if (logError) {
errorStream = new LogOutputStream(managingTask, Project.MSG_WARN);
}
if (error != null) {
errorStream = new LazyFileOutputStream(error, append);
managingTask.log("Error redirected to " + error,
Project.MSG_VERBOSE);
}
if (errorProperty != null) {