title: Understanding Python logger names
body: <p>I have named my Python loggers following the practice described in <a href="https://stackoverflow.com/questions/401277/naming-python-loggers?rq=1">Naming Python loggers</a></p>
  
  <p>Everything works fine if I use basicConfig(). But now I'm trying to use a configuration file and dictConfig() to configure the loggers at runtime.</p>
  
  <p>The docs at <a href="http://docs.python.org/2/library/logging.config.html#dictionary-schema-details" rel="nofollow noreferrer">http://docs.python.org/2/library/logging.config.html#dictionary-schema-details</a> seem to say that I can have a "root" key in my dictionary that configures the root logger. But if I configure only this logger, I don't get any output.</p>
  
  <p>Here's what I have:</p>
  
  <p>logging_config.yaml</p>
  
  <pre><code>version: 1
  formatters:
    simple:
      format: '%(asctime)s - %(name)s - %(levelname)s - %(pathname)s:%(lineno)s - %(message)s'
      datefmt: '%Y%m%d %H:%M:%S'
  
  handlers:
    console:
      class: logging.StreamHandler
      level: DEBUG
      formatter: simple
      stream: ext://sys.stdout
    file:
      class: logging.FileHandler
      level: DEBUG
      formatter: simple
      filename: 'test.log'
      mode: "w"
  
  # If I explicitly define a logger for __main__, it works
  #loggers: 
  #  __main__:
  #    level: DEBUG
  #    handlers: [console, file]
  root:
    level: DEBUG
    handlers: [console, file]
  </code></pre>
  
  <p>test_log.py</p>
  
  <pre><code>import logging
  logger = logging.getLogger(__name__)
  import logging.config
  import yaml
  
  if __name__ == "__main__":
      log_config = yaml.load(open("logging_config.yaml", "r"))
      logging.config.dictConfig(log_config)
      #logging.basicConfig() #This works, but dictConfig doesn't
      logger.critical("OH HAI")
      logging.shutdown()
  </code></pre>
  
  <p>Why doesn't this produce any logging output, and what's the proper way to fix it?</p>