logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: RepositorySelector question...
Date Tue, 15 Oct 2002 23:36:16 GMT

No one else has set up a repository selector?  hmm....  Can someone please 
comment on below?  Thanks

Jake

At 10:23 AM 10/15/2002 -0500, you wrote:

>I trying to set up a repository selector based on Ceki's doc 
>http://qos.ch/containers/sc.html .
>
>I put the CRS class in $TOMAT_HOME/shared/lib and added the following to 
>my Log4jInit class before running any configurator:
>
>Object guard = new Object();
>LogManager.setRepositorySelector(new Log4jCRS(), guard);
>
>
>That all seems to work fine.  However, I need to remove this entry when I 
>shut the app down.  Note the remove method in the CRS class:
>
>/** * The Container should remove the entry when the web-application * is 
>removed or restarted. * */
>public void remove(ClassLoader cl) {
>     ht.remove(cl);
>}
>
>
>I could do that in the contextDestroyed() method in my servlet context 
>listener.  However, how to I get a handle on the original CRS object to 
>call the remove on?  I need to do that, right?  If I just grab a new one, 
>it will have an empty hashtable and callling remove will be pointless...if 
>not cause an exception.  I don't quite see a way to get it through 
>LogManager.  Am I missing something?
>
>Jake
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message