avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: Log Management
Date Sun, 04 Aug 2002 09:32:02 GMT

Huw Roberts wrote:

>I'd like to be able to control the logging levels (and maybe one day the log targets)
for Phoenix components, applications and blocks.  Here's one scheme for doing it, but its
fairly intrusive so I'd like to get some feedback on it.

You may want to take a look at the following:

This defines a model of a logging system - it includes things like the 
default logging priority, default target and target descriptors.

This defines a logging category, its priority, target, and category name.

This defines a set of categories relative to a root category (i.e. set 
of sub-categories) that inherit priority and target info from the parent

This is basically a class that takes a LoggingDescritpr as a constructor 
and uses that to establish the loggng system.  It also provides support 
for the assignment of categories based on supplied CategoryDescritpor 
and Category arguments.

I'm not suggesting this as a solution - just feedback - there is more 
work needed in getting the targets more cleanly defined.

>1) Create a LogManager interface through which the logging level for a particular Logger
can be get and set.  (attached) 
>2) Do an implementation for each supported logging package, e.g. org.apache.avalon.framework.logger.LogKitManager,
Log4JManager, etc

Would prefer this sort of things to be under someting like 
excalibur.logger - not keep about seeing this in the framework.

>3) Add a method to the Logger interface to return the LogManager:
>    /**
>     *  Returns the log manager for this logger.  It is used to get and set
>     *  the loging priority
>     */
>    public LogManager getLogManager();

Should not be exposing the logging manager to clients.  I understand the 
need to an interface to get the log manager - but I don;t agree with the 
idea of including this in Logger.

Cheers, Steve.

>The LogManager would then be exposed for management in the 'standard' way - for Phoenix
this would be a seperate topic for each exported object that is also LogEnabled.  
>To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

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

View raw message