logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Farquhar <sc...@atlassian.com>
Subject Default Repository Selectors / Orion Repository Selector
Date Thu, 28 Feb 2002 00:48:20 GMT
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


Mime
View raw message