Bug 16860 - Silent or Debug a single target
Summary: Silent or Debug a single target
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.1
Hardware: Other other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2003-02-06 22:09 UTC by Thomas Engelschmidt
Modified: 2008-11-24 03:57 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Engelschmidt 2003-02-06 22:09:37 UTC

It could be very nice if it were possible to suppress the output from a target,
with a silent attribute. As a build file grows in size, the 'trivial' 
information can be overwhelming.

<target name="sometarget" silent="true">
   <echo message="This line will not appear in log because of silent"/>

Furthermore it would also be very nice if it were possible to only debug a 
certain target, this could also be done with a attribute. 

<target name="sometarget" debug="true">
   <echo message="Everything this target does will be debugged to system.out"/>

best regards
Thomas Engelschmidt
Comment 1 Conor MacNeill 2003-02-06 22:26:13 UTC
Have you looked at the record task?
Comment 2 Dominique Devienne 2003-02-06 22:29:21 UTC
Note directly related, by to silence task I compose within my own tasks, I 
extend them to redirect all or some log() calls to a different level. E.g.

  private static class GetUrl
                       extends Get {

    public void log(String msg) {   
      if (msg != null && (msg.startsWith("Getting:") ||
                          msg.startsWith("Not modified"))) {
      else {
        // Push error messages to verbose level.
        log(msg, Project.MSG_VERBOSE);