Bug 2383 - BasicConfigurator's deprecated method : enableAll()
BasicConfigurator's deprecated method : enableAll()
Status: RESOLVED WONTFIX
Product: Log4j
Classification: Unclassified
Component: Configurator
1.0
Other other
: P3 normal
: ---
Assigned To: log4j-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2001-06-28 09:07 UTC by Laurent RIEU
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent RIEU 2001-06-28 09:07:57 UTC
Dunno whether or not this is an intended thing, but I recently experienced some 
problem when replacing version 0.9.1 with the 1.0 release.
Apparently a very first call to the BasicConfigurator enableAll() method ends 
up with the DEBUG and INFO priorites being disabled !!

Code sample :

org.apache.log4j.BasicConfigurator.enableAll();
org.apache.log4j.Category c = org.apache.log4j.Category.getInstance("Toto");
c.debug("Hello world !");
c.info("Hello world !");
c.warn("Hello world !");
c.error("Hello world !");
c.fatal("Hello world !");

results in displaying :

160  WARN  [main]                                  Toto     - Hello world !
571  ERROR [main]                                  Toto     - Hello world !
601  FATAL [main]                                  Toto     - Hello world !

I know this API is deprecated, but it looks strange to me that such an 
unexpected bug appears !!

Laurent
Comment 1 Ceki Gulcu 2002-05-07 21:33:34 UTC
Version 1.0 is no longer maintained and the BasicConfigurator.enableAll method 
no longer exists.