title: Turn Off Apache Common Logging
body: <p>I am using Apache Common Logging library in my standalone application. After searching through the web, I try to turn off the logging by using</p>
  
  <pre><code>package javaapplication1;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  /**
   *
   * @author yccheok
   */
  public class Main {
  
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) {
          // TODO code application logic here
          System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog");
  
          log.info("You do not want to see me");
      }
  
      private static final Log log = LogFactory.getLog(Main.class);
  }
  </code></pre>
  
  <p>However, I still can see the log message being printed. May I know what had I missed out?</p>
  
  <p>I can turn off the logging by putting</p>
  
  <pre><code># Sample ResourceBundle properties file
  org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
  </code></pre>
  
  <p>in commons-logging.properties.</p>
  
  <p>However, during my development time, my Netbeans doesn't know where to get commons-logging.properties, and sometimes I need to turn off logging during development time.</p>