Hello Scott,
Sorry for not responding earlier. My working assumption is that the
repository selector is set by
the application server code. This makes very much sense in the case of
JBoss which uses
log4j for its own logging. Allowing the end user to set the repository
selector is a dangerous
operation. So I am not keen on letting it happen. I have to think about it
some more.
I did not really understand the aim of the OrionRepositorySelector. What
does it
do? It seems like overkill to write a repository selector for just
searching for
property files. What am I missing. By the way, the code for
OrionRepositorySelector
was not included in your previous message. Regards, Ceki
At 12:07 07.03.2002 +1100, Scott Farquhar wrote:
>I posted this a week ago, and I didn't receive any response, so I am
>reposting in the hope that someone will have any opinion, or whether I
>should just post a patch.
>
>My suggestion is to have another argument, which defines the default
>repository selector to use. The reason is that unless your application
>server supports startup classes, there is no way to set the repository
>selector before application classes start logging.
>
>Please read below and let me know your opinions (if you have any). I am
>eager to release my code, but it would require releasing a patched version
>of log4j to get this to work.
>
>Cheers,
>Scott
>
>-------- Original Message --------
>Subject: Default Repository Selectors / Orion Repository Selector
>Date: Thu, 28 Feb 2002 11:48:20 +1100
>From: Scott Farquhar <[EMAIL PROTECTED]>
>Reply-To: "Log4J Developers List" <[EMAIL PROTECTED]>
>To: Log4J Developers List <[EMAIL PROTECTED]>
>
>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 :: [EMAIL PROTECTED]
>
>Atlassian :: http://www.atlassian.com
> Supporting YOUR J2EE World
>
>
>
>--
>Scott Farquhar
>E :: [EMAIL PROTECTED]
>M :: +61 414 884 583
>W :: http://www.atlassian.com
>
>--
>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]>
--
Ceki G�lc�
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>