title: How to use SLF4J Log4jLoggerAdapter
body: <p>I'm deploying an enterprise application on Weblogic 8.1 which has log4j 1.2.8 on it's classpath. I'm getting the following error with SLF4J 1.6.1:</p>
  
  <blockquote>
    <p>SLF4J versions 1.4.0 and later
    requires log4j 1.2.12 or later</p>
  </blockquote>
  
  <p><a href="http://www.slf4j.org/codes.html#log4j_version" rel="nofollow">http://www.slf4j.org/codes.html#log4j_version</a></p>
  
  <p>Above link recommends using Log4jLoggerAdapter. </p>
  
  <p>I've changed</p>
  
  <pre><code>Logger logger = LoggerFactory.getLogger(HelloWorld.class);
  logger.info("Hello World");
  </code></pre>
  
  <p>to</p>
  
  <pre><code>Log4jLoggerAdapter logger = (Log4jLoggerAdapter) LoggerFactory.getLogger(HelloWorld.class);
  logger.info("Hello World");
  </code></pre>
  
  <p>However, I'm still encountering the error.
  Any advice on how to correctly implement this?</p>
  
  <p>Thanks.</p>
  
  <p>[edit]
  slf4j-api-1.6.1.jar and slf4j-log4j12-1.6.1.jar are on my development classpath, and packaged into APP-INF/lib of my EAR file. log4j 1.2.8 is on application server's classpath.</p>