You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Ja...@rzf.fin-nrw.de on 2003/08/27 07:35:53 UTC

org. ... ant.Main:508: System.setErr() with wrong argument

In Ant´s CLI class "Main" on line 508 is written:
        if (logTo != null) {
            out = logTo;
            err = logTo;
            System.setOut(out);
            System.setErr(out);
        }

logTo is set before while handling the cli argument "-logfile" as
PrintStream. 
1) we use the long form like present, so replace the last statement:
        if (logTo != null) {
            out = logTo;
            err = logTo;
            System.setOut(out);
            System.setErr(err);      // <---- err instead out
        }
2) because out and err are set to the same
        if (logTo != null) {
            System.setOut(logTo);
            System.setErr(logTo);
        }

I prefer the first one because there is more documented.


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org