> From: Conor MacNeill [mailto:[EMAIL PROTECTED] 

> 
> In Ant, one of the build listeners is special. It is *the* logger. It 
> implements the BuildLogger interface and is the one which is 
> controlled 
> by the command line -v and -debug switches. Other build listeners are 
> controlled by mechanisms specific to each listener.
>

Well we also have the <record/> loggers. Which although not controlled
by the commad line, I think they should have the same rights to events
as "the logger" (otherwise they are useless for debugging sections of
a build).
 
>
> Now, for a while I've been thinking about whether there should be a 
> mechanism to control that logger. It would allow tasks to change the 
> logger's level dynamically. This is actually possible now but a new 
> interface, BuildLogger2, could allow you to query the debug 
> level of the 
> logger. Note that if this were possible, then deciding not to 
> issue log 
> messages based on the state of *one* listener would affect all other 
> listeners. That may not be cool, but would be at the task writer's 
> discretion.

It you can decide not to issue messages, you can decide to change the
behavior
of your task in a more radical fashion. But nevermind this point.

Still if we want to have such functionality what we would need is an API
in project to check for current "logging level of interest" that
internally
will consult ALL BuildLogger2 instances and give the aggregated answer.
Such a system will work in the presence of <record/> loggers.

Jose Alberto.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to