On Sep 24, 2008, at 11:14 AM, Hans Dockter wrote:


On Sep 24, 2008, at 10:53 AM, Adam Murdoch wrote:



Hans Dockter wrote:
Hi,

some Ant tasks don't use the Ant logging system for some of there messages but use System.out.println instead. For example the javac tasks does this with warnings from the compiler. The launch4j tasks does this as well. There is not much we can do about this as long as we use those tasks.

We would still have this problem if builds do their own writing to stdout, or if they fork processes, or if they use these ant tasks (or ones like them) directly.

To solve the problem, we could bridge stdout and stderr across to logging, with default info level for stdout and error level for stderr.

Good point. I gonna implement a STDOUT/ERR logging adapter.

After having implemented it (not submitted yet) I'm not sure if this is really a good idea. After all we 'steal' the normal debugging usage of println from the developer. You have to run Gradle with -d to see println output (which is delegated to INFO level). The alternative would be to delegate println not to INFO but to LIFECYCLE. We would not have reduced any noise then but at least the messages would end up in a file when doing file logging.

Or we could prepare only our AntBuilder to delegate its System.out/ err output to the logger.

Or we leave things as they are.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to