At 06:49 PM 1/22/2005 +0100, you wrote: >At 05:02 PM 1/22/2005, you wrote: >>At 07:06 PM 1/21/2005 -0600, you wrote: >> >So for 1.2 I need to use a custom repository selector from the sandbox >> >and in 1.3 there is one available in the core. Is that correct? >> >>Yup! > >But there are other differences. In 1.3, the "log4j.repositorySelector" >system property is processed by LogManager, in 1.2.x that system >property has no effect.
Good point to make note of. However, using the InitContextListener from logging-log4j-sandbox takes care of this for any given webapp. It sets the repository selector, if it hasn't already been set, with the users preferred repository selector provided as a context param in the web.xml file. It also has some other nice functionality which might be of use to people. See the javadoc for info.
> Moreover, in 1.3, ContextJNDISelector will >also configure your named repository when it creates it. In 1.2, it >will just create it leaving to you the responsibility of configuring >it.
Which InitContextListener also takes care of.
> >In 1.3, you can detach a repository by name. In 1.2.x you cannot. So, >when your web-app is recycled you can shutdown and detach it whereas >in 1.2 your repository will not be recycled along with your >web-app. See also [1] o.a.l.selector.servlet.ContextDetachingSCL. >
It should be shut down upon webapp shutdown using LogManager.shutdown(), which InitContextListener does. It just doesn't do it by name. If you call LogManager.shutdown(), it should shut down the current logger repository, right? I haven't looked at this code lately in 1.3, but it should do the same thing without needing to know the name of the current logger repository. It might be nice to know for logging purposes, but why is it needed?
>These are small differences but which sometimes can add up to make a big >difference. >
repository selectors work nicer in 1.3, but I'm not sure a big difference will be seen by an end user using Log4j-1.3 -vs- using Log4j-1.2 + sandbox utilities.
>[1] http://tinyurl.com/3vpm8 > >Oh, and I forgot to mention the internal logs generated by log4j itself. >
Yes, that's certainly nice, but is a bit tangential to the current question. I'm certainly not advocating using 1.2 over 1.3. I'm just making it known that using repository selectors is possible in 1.2.
Jake
>>Jake
>
>--
>Ceki G�lc�
>
> The complete log4j manual: http://www.qos.ch/log4j/
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
