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]>
