Send reply to:          "LOG4J Developers Mailing List" <[EMAIL PROTECTED]>
From:                   "Deacon Marcus" <[EMAIL PROTECTED]>
To:                     "LOG4J Developers Mailing List" <[EMAIL PROTECTED]>
Subject:                RE: Revised log4j interfaces
Date sent:              Fri, 24 Aug 2001 22:13:34 +0200


> Just one small suggestion - if it makes just a little sense for something to
> be an interface instead of an abstract class, in the long run it is almost
> always better to make it an interface. If, under some conditions and/or JDK
> versions, interfaces are noticeably slower, I'd consider it a design bug in
> JDK and/or its JIT and assume they'd fix it in near future anyway.
>
> > Ceki G�lc� - http://qos.ch
>
> Greetings, deacon Marcus

I'd go along with this, and suggest that the implementation class
could be called DefaultLogger or similar. If there were to be multiple
implementations, you could provide a BaseLogger or
AbstractLogger (if abstract) base class - this may be unnecessary.
Possibilities are:

DefaultLogger -> Logger
BaseLogger -> Logger
DefaultLogger -> BaseLogger -> Logger
DefaultLogger -> AbstractLogger -> Logger

The choice depends on how much customisation should be
provided.

There is a problem with interfaces, where implementing code will
break if a new method is added; this can be minimised by
recommending that users extend the base class rather than
implement the interface, in most circumstances.
--
Andrew Harris
[EMAIL PROTECTED]

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

Reply via email to