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 Tue, 08 May 2001 21:20:44 GMT
At 06:26  8/5/01 -0000, Magesh Umasankar wrote:
>Hi,
>Ant2 has got bigger fish to fry.  I suggest we let the end-user decide
what logging tool to use with Ant2.  We can create a Logger interface and
provide a couple of implementations - probably for Log4J and LogKit.  
>
>The user can choose from one of the default implementations or write a
Custom implementation for some other logging tool, if s/he needs to.  
>
>Please find attached a REAL  CRUDE implementation, but one that will
illustrate (I hope :-)) what I am trying to convey.  
>
>I have implemented the Logger interface for Log4J and most popular logging
tool - System.out ;-). Configure log.properties either with Log4JLogger or
SystemOutLogger as the value for the key LogClassName.

This is a standard approach to this situation and it is dead WRONG ;)

What is the reason for building a facade?
1. to reduce complexity
2. to allow pluggability

Ant does not need (2) in any shape or form. I would also suggest that (1)
is not needed if the underlying system is not complex. When the complexity
of the facade approaches complexity of the underlying system then there is
absolutely no reason for a facade. As the facade you present is roughly the
same complexity as logkit I don't think you can claim that the facade is
for (1). 

Just FYI, logkit started out as a facade like you described around a
complex system. I then came to the above conclusions and rewrote the facade
as an actual implementation. In actual fact the size of my code (excluding
LogTargets which are analogous to Log4Js Appenders) was less as an
implementation than as a facade. ;)

So as we need channels/categories, priorities and different Appenders /
LogTargets there is no need for a facade IMHO. The reason for using ant
over make is similar to the reason of using logkit over log4j. Ant doesn't
do all the things make does - but it is easier to use. LogKit doesn't do
all the things Log4j does - but it is easier to use ;)



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