title: Python logging configuration file
body: <p>I seem to be having some issues while attempting to implement logging into my python project.</p>
  
  <p>I'm simply attempting to mimic the following configuration:</p>
  
  <p><a href="http://docs.python.org/library/logging.html#logging-to-multiple-destinations" rel="noreferrer">Python Logging to Multiple Destinations</a></p>
  
  <p>However instead of doing this inside of code, I'd like to have it in a configuration file.</p>
  
  <p>Below is my config file:</p>
  
  <pre><code>[loggers]
  keys=root
  
  [logger_root]
  handlers=screen,file
  
  [formatters]
  keys=simple,complex
  
  [formatter_simple]
  format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
  
  [formatter_complex]
  format=%(asctime)s - %(name)s - %(levelname)s - %(module)s : %(lineno)d - %(message)s
  
  [handlers]
  keys=file,screen
  
  [handler_file]
  class=handlers.TimedRotatingFileHandler
  interval=midnight
  backupCount=5
  formatter=complex
  level=DEBUG
  args=('logs/testSuite.log',)
  
  [handler_screen]
  class=StreamHandler
  formatter=simple
  level=INFO
  args=(sys.stdout,)
  </code></pre>
  
  <p>The problem is that my screen output looks like:<br>
        2010-12-14 11:39:04,066 - root - WARNING - 3<br>
        2010-12-14 11:39:04,066 - root - ERROR - 4<br>
        2010-12-14 11:39:04,066 - root - CRITICAL - 5  </p>
  
  <p>My file is output, but looks the same as above (although with the extra information included).  However the debug and info levels are not output to either.</p>
  
  <p>I am on Python 2.7</p>
  
  <p>Here is my simple example showing failure:</p>
  
  <pre><code>import os
  import sys
  import logging
  import logging.config
  
  sys.path.append(os.path.realpath("shared/"))
  sys.path.append(os.path.realpath("tests/"))
  
  class Main(object):
  
    @staticmethod
    def main():
      logging.config.fileConfig("logging.conf")
      logging.debug("1")
      logging.info("2")
      logging.warn("3")
      logging.error("4")
      logging.critical("5")
  
  if __name__ == "__main__":
    Main.main()
  </code></pre>