title: Log4J: problem with isDebugEnabled() method
body: <p>I am struggling with Log4J and isDebugEnabled() method.</p>
  
  <p>When I execute:</p>
  
  <pre><code>package org.test;
  
  import org.apache.log4j.Level;
  import org.apache.log4j.Logger;
  
  public class Test {
  public static Logger logger = Logger.getLogger(Test.class.getName());
  
  public static void main(String[] args) { (new Test()).test(); }
  
  public void test() {
      System.out.println("Logger " + logger.getName());
      System.out.println("level: " + logger.getLevel());
      logger.setLevel(Level.DEBUG);
      System.out.println("level: " + logger.getLevel());
      System.out.println("debug? " + logger.isDebugEnabled());
  }
  }
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Logger org.test.Test
  level: null
  level: DEBUG
  debug? false
  </code></pre>
  
  <p>The logger level is obviously <code>DEBUG</code>, but <code>logger.isDebugEnabled()</code> returns false.
  Do you have an idea how to fix that?</p>
  
  <p>EDIT:
  I have tried with other versions of log4j and with a <code>Level</code> cast, and it did not change anything.</p>