Many Thanks, Hans, for elaborating on this in such great detail. Since I am going to deploy my build scripts on some distributed build machines (using TeamCity) and those require to run stable I will stick with the latest released version (0.5.1), and run with the '-i' flag for the time being.
Thanks again, Niko On Wed, Jan 7, 2009 at 9:06 PM, Hans Dockter <[email protected]> wrote: > > On Jan 7, 2009, at 5:31 PM, Niko Schmuck wrote: > >> Hi all: >> >> I am currently struggling in the attempt of getting to see the output >> of an ant task. >> As described in ch. 8.1 of the user guide, I tried to set the >> redirection from QUIET to log level INFO, as follows... >> >> task('compile').doLast { >> project.captureStandardOutput(LogLevel.INFO) >> ant.exec(executable: 'cmd', dir: projectDir) { >> arg(value: '/c') >> arg(value: 'nmake') >> } >> } >> >> ... also calling disableStandardOutputCapture() on my project didn't >> bring the stdout to gradle's console. >> >> >> Any ideas? > > Ant tasks have two ways of sending messages. Either with println (which is > not such a good idea I think, but quite a few Ant tasks do this). Or via the > Ant logging framework. > > In the first case you will see the output in Gradle without the need to > reconfigure anything. The standard out is by default redirected to QUIET, > which is the highest level and is always shown. The reason behind this that > people might put prinltn debug statements in there build script so this > should always show up by default. There are some Ant task we use under the > hood, which use println to send non critical messages (e.g. groovydoc). For > the execution of such tasks we redirect for example standard out to the INFO > level. > > Fortunately most Ant tasks use the Ant logging framework. We catch messages > send to this framework and redirect them to the Gradle logging system. Those > messages have a log level and we send them to the corresponding Gradle log > level. Error->QUIET, Warning->LIFECYCLE, Info->INFO, ... > > Unfortunately this is fixed. So there is no easy solution for your problem. > You could probably hook into our very flexible underlying logback logging > system to make this work. But I guess the easier way is, if you could file a > Jira. This should be very easy to implement and I would do this rather soon. > If you don't mind working with trunk you should be fine then. > > - Hans > > -- > Hans Dockter > Gradle Project lead > http://www.gradle.org > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
