Open tombentley opened 10 years ago
Originally commented at Fri, 01 Feb 2013 09:56:09 GMT:
To me personally logging should not be used for "proper output", ie useful output that is part of the software's operation. I say this because it's normally possible to affect logging output from outside of the program and I don't think we want that.
So I would just go with your first option. (if my opinion means anything hehe)
Originally created at Fri, 01 Feb 2013 09:48:26 GMT in ceylon/ceylon-common#26:
The tools framework currently doesn't do anything special for the standard streams (stdout, stderr & stdin): If a tool wants to print to standard output or error it just uses
System.out.println()
/System.err.println()
. I'm wondering if we should change this. If the top level tool was responsible for injecting thePrintStream
s (andInputStream
in the case of standard input) it would:TopLevelToolTest
running in the compiler tests),It would mean that tools would need to use the injected streams instead of reaching immediately for
System.*
.The other way of looking at this is that tools "shouldn't" be reaching for raw streams at all, but should be using logging. In which case this becomes a question about whether it is the top level tool's job to configure logging, or the individual tools', or some combination.