Hello Ceki,

So, being somewhat new with Log4j, are you saying that given the fact
that Tomcat does not do RepositorySelectors for me and also doesn't
give me control of the context, that it would be pretty difficult to
figure out how to write a custom RepositorySelector?  Are there any
examples that exist anywhere on this while I wait for my free copy of
your upcoming book (thank you for offering this, BTW. When do you
expect it to come out?)?

Thanks,

Jake

Thursday, May 30, 2002, 10:45:24 AM, you wrote:


CG> Jake,

CG> Very good question.

CG> Log4j 1.2 introduced the concept of RepositorySelectors specifically
CG> to deal with this problem. Unless the container does for you (which
CG> Tomcat does not) you'd have to write your own RepositorySelector.
CG> Writing a selector is trivial if you control the application
CG> context... which you don't.

CG> I am including a chapter on this subject in my log4j book. Remind me
CG> to send you a free copy when it comes out.

CG> At 07:51 30.05.2002 -0500, Jacob Kjome wrote:

>>I was reading the Log4j manual and it suggests that for each webapp, you 
>>should use a separate log4j jar file in each WEB-INF/lib to make sure that 
>>each log4j is in its own "log4j Universe".  However, this puts constraints 
>>on where I put my libraries that use log4j.  For instance, if I have log4j 
>>in WEB-INF/lib, I can't have libraries that use log4j in TOMCAT_HOME/lib 
>>because the libraries in the parent classloader won't find the Log4j 
>>libraries in the child classloader.  However, that is where I'd like to 
>>put some of my libraries since they are common to all my webapps.  In 
>>fact, Log4j is common to all my webapps so I'd like to put it in 
>>TOMCAT_HOME/lib as well.  However, this would cause conflicts becase Log4j 
>>would no longer be running in its own "Log4j Universe".
>>
>>So, in a manner of speaking, my libraries are being held hostage in 
>>WEB-INF/lib because Log4j is designed in a way that it needs to live on 
>>it's own and not be shared by multiple apps at once.
>>
>>Have I interpreted things wrong, or is this what was intended?  Is there 
>>anything I can do to keep my libraries from being "held hostage"?  Are 
>>there any tricks that I'm missing here?
>>
>>Jake

CG> --
CG> Ceki

CG> SUICIDE BOMBING - A CRIME AGAINST HUMANITY
CG> Sign the petition: http://www.petitiononline.com/1234567b
CG> I am signatory number 22106. What is your number?


CG> --
CG> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
CG> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



-- 
Best regards,
 Jacob                            mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to