logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Womack <mwom...@bevocal.com>
Subject RE: Adding isConfigured method to LoggerRepository interface
Date Wed, 28 Aug 2002 16:46:08 GMT
+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:ceki@qos.ch]
> Sent: Wednesday, August 28, 2002 7:22 AM
> To: log4j-dev@jakarta.apache.org
> 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:log4j-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:log4j-dev-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>


Mime
View raw message