ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [Vote] Logging
Date Wed, 09 May 2001 11:26:07 GMT
At 12:36  9/5/01 +0200, Stefan Bodewig wrote:
>protected void log(int loglevel, String message) {
>    getTaskContext().getLogger().log(this, loglevel, message);

*shudder* - sending "this" through the logger system violates just about
every design principle ;) Worst it could mean we end up supporting all
sorts of ugly hacks. About two years ago I used to log like that - after
seeing some horrible code result I really wouldn't want to do that but YMMV ;)

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

yup ;)

>> 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?

essentially 3 things 
1. categories/channels/subsjects
2. hierarchy
3. priority

We need (1) as a side effect of choosing to do multi threading (more on
that later). We need (2) for container tasks as you suspect and (3) is
another thing handled by aspects before get to message handlers.

>> 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.

actually that was a point I was going to raise later. There is a very big
danger in doing this hierarchially aswell I tried a few prototype build
files and found that it was extreme hell to manage ;) I will expand on this
later though.

>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.

Well if we do have general hierarchial needs then there is no need for
logkit - however I suspect this will not be the case. Later on I will give
reasoning why only Context Properties/ExecutionFrames should be
hierarchial. Anyways I scheduled this for week 3 of ant discussion ;) so
unless you have a need for it now I think we could delay the discussion
till then (or merge it in with your design orientated points???).



Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message