You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Leo Simons <le...@apache.org> on 2003/02/08 20:09:41 UTC

[Fwd: Re: [logging] To depend or not to depend?]

whoops!

-------- Original Message --------
Subject: Re: [logging] To depend or not to depend?
Date: Sat, 8 Feb 2003 18:09:16 -0000
From: James Strachan <ja...@yahoo.co.uk>
Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
Newsgroups: gmane.comp.jakarta.commons.devel
References: <3E...@isisnetworks.net> 
<b2...@main.gmane.org> <b2...@main.gmane.org>

From: "Leo Simons" <le...@apache.org>
> Leo Simons wrote:
> > What is probably perfectly doable is providing:
> > --------------------------------
> > package org.apache.avalon.framework;
> >
> > public class CommonsLoggingLogger implements Logger
> <snip/>
> > --------------------------------
> >
> > this is on the TODO. Not for an upcoming avalon-framework 4.1.4, but it
> > might very well be in 4.1.5.
>
> okay, so I took a closer look and just implemented this as it's real
> easy to do. I actually did
>
> public final class CommonsLogger implements Logger, Log { /* ... */ }
>
> as that makes life even easier on component developers. One method
> causes problems:
>
> interface Logger
> {
>      /**
>       * Create a new child logger.
>       * The name of the child logger is
> [current-loggers-name].[passed-in-name]
>       * Throws <code>IllegalArgumentException</code> if name has an
> empty element name
>       *
>       * @param name the subname of this logger
>       * @return the new logger
>       */
>      Logger getChildLogger( String name );
> }
>
> as [current-loggers-name] is not exposed by Log. Would it be acceptable
> to add a getName() or something similar to the Log interface and the
> implementations? That way, we can fully implement the avalon-framework
> Logger contract on top of commons-logging.

+1.

Seems reasonable to me. I guess it won't break anyones code who just use
commons-logging to log. The only risk is people who implement Log, but since
most of the implementations are inside commons-logging, it doesn't seem too
bad.

BTW did you mean to CC dev@httpd.apache.org or did you mean avalon-dev? :)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org