+1 to this concept, but does it have to be dependent on some code
(configurator or user) calling a setConfigured() method?  Is there anyway
for this value to be set when code starts manipulating the logger/appender
settings?

-Mark

> -----Original Message-----
> From: Ceki G�lc� [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 7:22 AM
> To: [EMAIL PROTECTED]
> Subject: Adding isConfigured method to LoggerRepository interface
> 
> 
> 
> In the past, developers have often complained about the difficulties
> of determining whether log4j has been already configured. One possible
> way is to check whether the root logger has been configured. For
> example,
> 
> Logger root = Logger.getRootLogger();
> boolean rootIsConfigured = root.getAllAppenders().hasMoreElements();
> 
> The slight problem with this technique is that log4j may be configured
> without this being visible at the root logger level.
> 
> I propose that in log4j 1.2.7 we add the isConfigured method
> (returning a boolean) in to the LoggerRepository interface. Users
> would then write
> 
> LogManager.getLoggerRepository().isConfigured()
> 
> to check whether log4j was already configured or not.
> 
> Existing configurators would call loggerRepository.setConfigured(true)
> when configuring log4j. User code would also have the possibility to
> call this method.
> 
> --
> Ceki
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

Reply via email to