title: Effectively debugging Log4j framework
body: <p>I wanted to implement logging for my web services.I have been playing around with <code>Log4j</code>. It's a really cool logging framework when it works.But when it doesn't , it's a pain to debug. </p>
  
  <p>My problem is that i am trying to log to the database , but for some reason I don't see anything being logged to the table. I have no clue whats causing this. </p>
  
  <p>In my <code>log4j.xml</code> i have the following line</p>
  
  <pre><code>&lt;log4j:configuration debug="true"
      xmlns:log4j='http://jakarta.apache.org/log4j/'&gt;
  </code></pre>
  
  <p>But when i deploy and run my web service in the debug mode in Eclipse , I don't see logging related debug statements on the console.</p>
  
  <p>I want to be able to see </p>
  
  <ul>
  <li><p>log4j initializing and configuring the loggers. So if anything is wrong with my  xml configuration i would know immediately.</p></li>
  <li><p>log4j logging to the destination , in this case to the database. If there is a some kind of a sql/database exception I would know.</p></li>
  </ul>
  
  <p>I am logging at the application level (the application is using its own log4j jar and configuration files as opposed to using the application servers logging mechanism)</p>
  
  <p>My project uses <code>log4j-1.2.17</code> , <code>Eclipse Luna 4.4.0</code>, <code>JBoss EAP 6.4.0</code>. </p>
  
  <p>Can our log4j experts suggest ways to effectively debug log4j itself. Are there Eclipse plugins that can help alleviate the pain.</p>