[2002-02-27 14:06 +0100] Jeremias Maerki ([EMAIL PROTECTED]) wrote:
> Yes, there's a reason (if I got it right): All log configuration is done
> in a config file or by the container (means: it is done from outside).
> And I think logging and logging configuration (ex. Priority) are two
> different concerns, so they shouldn't be in the same interface.
>
> So, you should not set the logging priority within your code. Having the
> priorities in a config file enables you to switch on logging for a
> particular category at the customer site if something goes wrong. You
> can't do that if you're hardcoding the priority.
I agree with your arguments, but we might want to take them a bit
further. In fact, the separation of concerns argument indicates that we
should also remove getChildLogger() from the Logger interface, because
getChildLogger() is definitely configuration. At that point the issue
becomes a lot clearer: The top-level container must create and
configure all child loggers needed anywhere in a component heirarchy,
before creating the top element of that heirarchy.
Is that really what we want? I would think that some containers could
be given the ability to configure the child loggers for their
components, either programmatically or from the Configuration.
By the way, Shawn's request arises because we're dealing with a service
(OpenORB Notification) that has 11 child loggers, each of which is
(currently, pre-Avalon) independently configurable both programmatically
and by configuration file. We're trying to figure out how to move that
to a more Avalon-y approach.
Gary
>
> > The org.apache.avalon.framework.logger.Logger
> > interface is a wrapper for the various loggers that
> > are available (ie. logkit, log4j, jdk14). However
> > it is missing a setPriority method which I need.
> >
> > Logkit/log4J/jdk14 all provide this method in their
> > Logger interface. Any reason it is not there in the
> > Framework Logger?
> > If not, I will provide patches to support it.
>
> Cheers,
> Jeremias M�rki
>
> mailto:[EMAIL PROTECTED]
>
> OUTLINE AG
> Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> Fon +41 41 317 20 20 - Fax +41 41 317 20 29
> Internet http://www.outline.ch
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>