ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject org. ... ant.Main:508: System.setErr() with wrong argument
Date Wed, 27 Aug 2003 05:35:53 GMT
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


Mime
View raw message