You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Scott Farquhar <sc...@atlassian.com> on 2002/02/28 01:48:20 UTC
Default Repository Selectors / Orion Repository Selector
I have successfully completed a repository selector for the orion
application server, which looks up the log4j.properties / xml files from
the bottom up, loading those in the most specific classloader, before
loading from parents.
Whilst the ability to configure a repository selector with
LogManager.setRepositorySelector(..)
is useful, unless you control the server, you cannot guarantee that your
repository selector will be loaded first.
My feature request is to be able to pass the classname of a default
repository selector as a system property. eg.
-Dlog4j.repositorySelector=org.apache.log4j.spi.OrionRepositorySelector
In LogManager, in the static{} initalisation, you can then load the class.
I have attached my suggested changes. Note that it needs refactoring,
but for the moment it is all in the one code block (for easy reading).
Any thoughts? Anyone else planning (or written) repository selectors?
If anyone is interested in helping me test the Orion selector, please
send me an email.
Cheers,
Scott
--
Scott Farquhar :: scott@atlassian.com
Atlassian :: http://www.atlassian.com
Supporting YOUR J2EE World