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:
http://home.osm.net/doc/merlin/api/assembly/org/apache/excalibur/merlin/model/LoggingDescriptor.html
This defines a model of a logging system - it includes things like the
default logging priority, default target and target descriptors.
http://home.osm.net/doc/merlin/api/assembly/org/apache/excalibur/merlin/model/Category.html
This defines a logging category, its priority, target, and category name.
http://home.osm.net/doc/merlin/api/assembly/org/apache/excalibur/merlin/model/CategoriesDescriptor.html
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
http://home.osm.net/doc/merlin/api/assembly/org/apache/excalibur/merlin/assembly/DefaultLoggerManager.html
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();
>
>
Disagree.
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.
>
>Thoughts?
>
>
>
>------------------------------------------------------------------------
>
>--
>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]>