ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [Vote] Logging
Date Wed, 09 May 2001 10:36:46 GMT
Peter Donald <donaldp@apache.org> wrote:

> At 11:33  9/5/01 +0200, Stefan Bodewig wrote:
>>Peter Donald <donaldp@apache.org> wrote:
>>
>>> I would like to do Ant2 logging with logkit.
>>
>>I'm completely with Conor here - logging should be done through
>>BuildListeners - feel free to write one for Logkit or Log4J or
>>whatever.
> 
> I don't know where it got confused but thats not the use of the
> logging toolkit. The logging toolkit is meant to act as a log
> "router" between tasks and listeners.

in AbstractTask:

protected void log(int loglevel, String message) {
    getTaskContext().getLogger().log(this, loglevel, message);
}

in the logger.log itself

// make BuildEvent be from task, taskcontext, loglevel and message
Iterator listeners = project.getListeners();
while (listeners.hasNext()) {
    ((BuildListener) listeners.next()).messageLogged(be);
}

This doesn't really ask for a full fledged logging framework at all.
So the need must hide in the hierarchical logging stuff ...

> I have said at least 4 times that the output Appenders/LogTargets
> would unlikely to be used ...

I think, I've only seen it once, but I must admit, that I skipped part
of the thread as the direction was foreseeable.  Anyway, take out the
LogTargets out of LogKit and we are left with hierarchical logging,
right?

> Well try coding it - I am sure you will see my point then ;)

Not really.

Logging is just one aspect that is supposed to be hierarchical.  You
will want the failOnError-aspect to be that as well (if we configure a
container to fail on errors, all its components should do so as well),
the classpath aspect - probably every single aspect we could come up
with.

This means, we need generic hierarchical aspects, not just
hierarchical logging - and as we do so, we shouldn't use different
mechanisms for classpath-aspects and logging-aspects IMHO.

Stefan

Mime
View raw message