ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject RE: Recent logging aint emacs friendly
Date Sat, 08 Jul 2000 16:46:08 GMT
At 09:35  8/7/00 -0700, you wrote:
>I feel a little funny jumping into this conversation, since I
>just started following this mail list last week and I'm not
>sure of the protocol of the list yet, but...

welcome :P

>Having a mode to the default logger means that you have to go
>in and modify the logger if you ever want to add more modes.
>The logger class is not closed from extensions in this way and
>may end up having a whole lot of cases for the different modes.

I used to think this way until I recently discovered that forward designing
is the bane of much of my code. I end up constantly refactoring when
classes use parts of classes every time I want to add a new logger. Which
essentially means lots more work than special cases and sometimes not for
very much benefit.

How many different types of logger is ant going to need that will derive
from default logger ? I can only really think of special cases that email
results for overnight testing + building or special listener for IDEs when
they include Ant. None of these cases will inherit from DefaultLogger so
there is little point in making it generic. The extent we would have to go
to to make it generic enough for inheritance is much larger than a simple
if statement based on a property. We can always factor it out later if it
becomes cluttered :P. 

>Having separate logger classes means the default logger can be
>closed to modifications when new loggers are added.  New modes
>just mean writing a new logger class.  I'm assuming there's
>some sort of factory method/class that knows how to instantiate
>the logger based on the command line property.

yes but it needs to be reworked as you can't get at commandline parameters
from the logger. ie you can't get what current log level and no access to
any command line parameters

>If the command line syntax is not clean, that can be changed
>independent of the logger class by just updating the syntax and
>the factory method/class that reads the property to build the
>corresponding logger class.


>BTW, Conor, I started using your DDCreator and ejbc tasks for
>WebLogic 4.x, and I have a couple of comments and questions.
>Should I email you off line or on the list?

email on list as there maybe someone elses imagination you may spark with
your comments. Not me but there may be someone :P.



| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |

View raw message