ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wolfgang Häfelinger <>
Subject tracing macros?
Date Tue, 20 Feb 2007 17:20:28 GMT

I'm  using  macrodef  a lot (a really great feature). What I'm looking for 
is a simple
way of tracing which macro is invoked. Something like "entring macro .. ", 
macro ..".

So derived a Trace class from, 
thing like:

public class Trace extends Sequential {
  public void execute() 
     // entrer trace statements ..
     // leaving trace statements ..

Then I created a task name "trace" and tried something like

<macrodef name="test">
     <!-- do something -->

which unfortunatley does NOT work :-( because Macrodef has a 
method while "lacking" a addSequential(Sequential s)  method.

Wouldn't it be cool to implementent such a trace task? Or do I miss 
Perhaps Ant (1.7) allows already tracing of macros ???

It would be even cooler  if  my  trace task could figure out automatically 
that the 
name of its surrounding  macrodef is "test". Is there a way to do that?? 

Yes, I   k n o w  that I can put my trace task within the macrodef 
sequential. This
works but it has some disadvantages:
 - performance
 - code bloat (would like to keeps things short and simple)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message