title: Best Practice of Using org.apache.commons.logging.LogFactory.getLog
body: <p>May I know what is the best practice of using org.apache.commons.logging.LogFactory.getLog?</p>
  
  <p>For me, I use it the following way :</p>
  
  <pre><code>public class A
  {
      private static final Log log = LogFactory.getLog(A.class);
  }
  
  public class B
  {
      private static final Log log = LogFactory.getLog(B.class);
  }
  </code></pre>
  
  <p>So, if I have 100 of classes, 100 of static log object will be created?</p>
  
  <p>Or is it best to do it this way?</p>
  
  <pre><code>public class A
  {
      private static final Log log = LogFactory.getLog(Main.class);
  }
  
  public class B
  {
      private static final Log log = LogFactory.getLog(Main.class);
  }
  </code></pre>
  
  <p>All the 100 classes are referring to a same single same log?</p>
  
  <p>Thank you.</p>