Python logging dictionary config
<p>I am trying to configure some logging for Python. From 
<a href="http://docs.python.org/howto/logging.html" rel="nofollow">http://docs.python.org/howto/logging.html</a>
It is recommended that we use a YAML configuration file -</p>

<pre><code>version: 1
formatters:
  simple:
    format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
handlers:
  console:
    class: logging.StreamHandler
    level: DEBUG
    formatter: simple
    stream: ext://sys.stdout
loggers:
  simpleExample:
    level: DEBUG
    handlers: [console]
    propagate: no
root:
  level: DEBUG
  handlers: [console]
</code></pre>

<p>In my code, I use this as -</p>

<pre><code>import logging.config

logging.config.dictConfig('logging.config') 
</code></pre>

<p>However, on running it, I get an error</p>

<pre><code>Traceback (most recent call last):
  File "TestLogger.py", line 62, in &lt;module&gt;
    Test5()  
  File "TestLogger.py", line 55, in Test5
    logging.config.dictConfig('logging.dict.2.config') 
  File "/usr/lib/python2.7/logging/config.py", line 776, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/lib/python2.7/logging/config.py", line 380, in __init__
    self.config = ConvertingDict(config)
ValueError: dictionary update sequence element #0 has length 1; 2 is required
</code></pre>

<p>So it seems that I am invoking the config file in an incorrect way. Just can't find the right way to invoke it. Help please?
Thanks so much</p>
