There are situations where you cant use static members. If you separate logging 
universes by using a specialzed RepositorySelector, which returns different 
loggers depending on diffenrent MDC values. If the basic framework classes, 
which are used in different applications (moduls), but running within the same 
virtual machine, would have static logger variables, they would always log to 
the same logger. The MDC which runs first into this class would win. 

There are cases where you not even can use instance members as loggers: A 
static helper function whithin a utitlity class must get the logger on the fly 
if you want to separate logger universes like descrbed above.

Heri

> -----Original Message-----
> From: Curt Arnold [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 29, 2005 2:16 AM
> To: Log4J Users List
> Subject: Re: Logger serialization
> 
...
> However, having a logger as an instance variable is rarely desirable.

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

Reply via email to