commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: [logging] JCL2.0 design - API
Date Wed, 01 Mar 2006 19:11:39 GMT
On Wed, 2006-03-01 at 18:22 +0100, Emmanuel Bourg wrote:
> There is no variable, this would be implemented with a static inner 
> class in the Log interface, something like this:
> public interface Log {
>      ...
>      public static class Factory {
>          public static Log getLog(String name) {
>              ...
>          }
>      }
> }

Fascinating! I haven't seen that trick before. An interface containing a
static method (via a little indirection)

Are you serious about this proposed API for the Log class, though?

I'm hoping that people will agree that the current Log API is ok (even
if it isn't 100% perfect), as that makes 2.x more backwards-compatible.
However if a change is made, I think it would make more sense to move to
the j.u.l/log4j solution (Log is abstract class) rather than invent yet
another design. However if you think 
really should be considered then we can start debating pros/cons.

PS: Craig, I agree completely with your miminal LogFactory abstract
class which has just the minimal possible implementations for
getInstance and getLog. All that map-of-factory-by-classloader stuff can
be pushed down into a subclass.....



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message