Curt et al.,
I had a long technical dicussion with a friend who mentioned that in "Effective Java" Joshua Bloch makes a compelling case against the setter approach (and in favor of constructors).
The existing configuration code relies on Appenders, Layouts and Receivers having a default constructor. However, the Component interface and ComponentBase class do *not* prevent the use of constructors taking an LR as argument in other classes, in particular in the classes indirectly instanciated by Appenders, Layouts, etc.
He also suggested a simple solution to the "default repository configuration while in the context of 'myWebApp'" problem which triggered all the recent changes. Basically, he suggests that in the static initializer of LogManager the default repository be configured before the repositorySelector is instantiated. During the configuration of the default repository, the repositorySelector field has to temporarily point to a default RepositorySelector, not the real selector, not yet instantiated.
This fix may imply that we can go back to the old internal logging guidelines which only required instance Logger variables, without the need to change every single class that log4j used internally.
-- 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]
