logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Puiu <stefan.p...@axetel.com>
Subject Re: log4j, JBoss, EJBs
Date Tue, 16 Sep 2003 15:23:34 GMT
Jake, thank you for your enlightenment, but what do you mean by "the 
setting of the LoggerFactory"? The LogManager.setRepositorySelector() 
method is called only once in my code (which I've largely borrowed from 
the examples Mark pointed me to btw).

My LoggerFactory and RepositorySelector subclasses are almost identical 
to Mark's examples, except for the EupkiLogger.makeNewInstance():
 public Logger makeNewLoggerInstance(String name) {
      return new EupkiLogger(name);

I've included the EupkiLogger implementation in the attachment, it's the 
old implementation, is there any problem with it?

Thank you for your help.

Jacob Kjome wrote:

> The "guard" is a simple object that protects against re-setting of the 
> LoggerFactory by anyone but the one who set it first with a particular 
> "guard".  Basically, this would allow a container to set the 
> LoggerFactory, but disallow applications running in the container from 
> changing it.  If the container holds a handle on the "guard" object, 
> then it alone can change the LoggerFactory.  If no one holds a handle 
> on the "guard" object, then no one can change the LoggerFactory once 
> it is set the first time.
> The setting of the LoggerFactory is, obviously, being called multiple 
> times.  Either avoid the multiple calls, catch and ignore the 
> exception, or hold a handle to the "guard" object and re-set the 
> LoggerFactory each time (probably not necessary or desired).
> Jake
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org

View raw message