title: Initialization using org.springframework.web.util.Log4jConfigListener entry in web.xml?
body: <p>In most of the Java projects using Spring, I find this entry in web.xml which is executed at server start-up:</p>
  <pre><code>&lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.util.Log4jConfigListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  <p>What is the purpose of <code>Log4jConfigListener</code>?</p>
  <p>In my legacy project I can also see this setting. However when i dive into the code I do not find anything special done in this class or further classes called internally by this class. I am sure there must be some good purpose behind putting above code snippet and I am missing it.</p>
  <p>In every class which putting the logs in file here is the entry</p>
  <pre><code>private static final Log    log  = LogFactory.getLog(PoolManagerImpl.class);
  log.debug(&quot;Number of connection pools to create = [&quot;
      + connection.size() + &quot;]&quot;);
  </code></pre>
  <p>Even if I comment out my web.xml entry, logging works fine. So what is it's purpose?</p>