title: How to implement different levels for specific modules in Python
body: <p>From this <a href="https://stackoverflow.com/questions/5326012/disable-logging-for-a-particular-package">stackoverflow question</a>, how does one implement the following configuration file?</p>
  
  <pre><code>[logger_qpid]
  level=NOTSET
  handlers=nullHandler
  qualname=qpid
  propagate=0
  </code></pre>
  
  <p>I am using logging.basicConfig:</p>
  
  <pre><code># Configure parser.
  parser = argparse.ArgumentParser(description = 'Allow for debug logging mode.')
  parser.add_argument('--debug', action = 'store_true',
                      help = 'Outputs additional information to log.')
  c_args = parser.parse_args()
  # Configure logging mode.
  if c_args.debug:
      # Enable debug level of logging.
      print "Logging level set to debug."
      logging.basicConfig(filename = LOG_FILENAME, format = '%(asctime)s %(message)s',
                          level = logging.DEBUG)
  else:
      logging.basicConfig(filename = LOG_FILENAME, format = '%(asctime)s %(message)s',
                          level = logging.INFO)
  </code></pre>