Hans Dockter wrote:
On Nov 1, 2008, at 12:20 PM, Hans Dockter wrote:
2. It would be good if the source of the logging were considered
when routing info/stdout messages.
For example, a call to logger.info() or println() in my build.gradle
is almost always interesting to me when I run Gradle, and should be
printed on the console when I run with default options (ie should be
treated as a lifecycle message).
Right.
I have forgotten about QUIET. I have added another log level called
QUIET (before it was just a command line option). I think println in
the build script should be always printed out (this is for example
handy for integration testing) and thus I think we should by default
redirect standard out to QUIET.
Do you mean everything to System.out is logged as QUIET? or just calls
to println() in the build script?
[...]
3. Task.captureStandardOutput() and Project.captureStandardOutput()
have inconsistent semantics. For Task, a call to
captureStandardOutput() declares 'whenever I execute, capture
standard output'. For Project, a call to captureStandardOutput()
says 'capture standard output now until forever'.
I prefer the Task semantics. I think Project.captureStandardOutput()
should behave in a similar way. It should declare that when the
project is evaluated, standard output should be captured. If
captureStandardOutput() happens to be called as the project is being
evaluated, then is should take effect immediately. And when
evaluation completes, it should restore to what it was when
evaluation started.
This means, for example, that the logging for a project can be
configured from somewhere else (a parent project, say) without
affecting the logging of the configurer. It also means that the
logging for a project does not affect the logging of other projects
which are implicitly evaluated during the evaluation of the project,
eg by a call to dependsOn().
What about calling project.captureStandardOutput from a task during
execution time. Should we accept this as a project wide global switch
as well?
You can skip this question. All execution time output can be
conveniently controlled via the tasks. Either by specifying it for
certain task, or by looping over all tasks of a project. So
project.captureStandardOutput is only for evaluation time.
I think so.
Should there be some kind of inheritance going on, where a project
inherits this setting from its parent, and tasks from their project?
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email