logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jan_bar" <herkul...@yahoo.com>
Subject Re: setRepositorySelector, guard and redeploy
Date Mon, 18 Sep 2006 06:31:36 GMT
Thanks for your extensive answer, see inline..

> Well, when you are using a repository selector, the idea is that you
> have Log4j in a position where it is not part of your app, but part
> of the server; otherwise there's no point to using a repository
> selector.   In order for a server wide instance of Log4j to service
> many apps without each of them stomping on each other's logging, each
> app needs to be assigned its own logger repository.  On the other
> hand, if you deploy your app with Log4j in WEB-INF/lib (and use
> child-first classloading behavior), you can just use the default
> logger repository since your app will be the only one utilizing the
> instance of Log4j.

I know about this possibility and also it's classloading order fragility. I
want to avoid this.

> The solution is to deploy your custom repository selector alongside
> the global instance of Log4j, not with your app.  And if you have
> access to the JBoss startup script, you can set the -D property to
> set the repository selector when JBoss starts up (sorry, can't recall
> the system property name to set ATM).

How can I set the repository selector of JBoss startup? Is the mentioned
property used in Log4j init or inside JBoss? I looked into sources of both,
but did not found any call to LogManager.setRepositorySelector().

I found org.jboss.portal.common.logging.LoaderRepositorySelector, which
looks exactly as something I miss in JBoss AS. It's part of the JBoss
Portal.

Thanks, Jan




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message