ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Burton" <>
Subject Re: -emacs flag ??
Date Thu, 01 Mar 2001 03:36:31 GMT

I think there are valid points both for keeping the existing logging
behavior -- especially because it allows you to see errors in context. 
But also, it's valid to want no prefix at certain times.  For whatever
reason, some editors either aren't configurable or people don't know how
to configure them to strip Ant's [javac] prefix so Ant should have greater
flexibility in this area to conditionally remove these prefixes.

So why not support a "logprefix" attribute at the task level by adding it
to the Task class?  Then in any task, you can specify
logprefix="no/off/false", etc. and the DefaultLogger class will turn on
"emacs" mode for the duration of that task.  

However, the problem then becomes how to set the logging prefix attribute
without having to edit all the <javac> tasks in all your build.xml's to
add it in.

As an easy way of modifying the attribute settings for tasks, I was
thinking of a scheme whereby properties could be automatically translated
into task attribute settings.  This would make it _much_ easier to change
default behavior and would be backwards compatible as well.  For instance,
the property
would be the same as specifying the optimize="on" attribute for all
<javac> tasks.  If you want to specify properties differently for
different <javac>'s, you could do this the same way it's done now by
specifying the optimize attribute with a property or literal as the
value.  Of course, whenever an attribute is specified in a task, it
overrides the corresponding property setting if one exists.

This scheme could then be applied to the logging prefix discussed
previously.  Just set the property,
and all your <javac> tasks will be executed with no logging prefix but
everything else will have a prefix.

I while ago, Diane mentioned the change in behavior where the <echo> task
now has a prefix where it didn't previously.  With this modification, she
could set the property,
and all the <echo> tasks in her 64 build.xml's would have no prefix.

Now everyone should be happy :)


View raw message