Help me understand this logging config

Roy Smith roy at panix.com
Tue Aug 30 08:39:26 EDT 2011


In article <mailman.566.1314696279.27778.python-list at python.org>,
 Peter Otten <__peter__ at web.de> wrote:

> Roy Smith wrote:
> 
> > I'm using django 1.3 and python 2.6.
> 
> Isn't dictConfig() new in 2.7? It looks like that is what you are using...

Oh, my, it turns out that django includes:

# This is a copy of the Python logging.config.dictconfig module,                                    
# reproduced with permission. It is provided here for backwards                                     
# compatibility for Python versions prior to 2.7. 

Comparing the django copy to lib/logging/config.py from Python 2.7.2, 
they're not identical.  It's likely they grabbed something earlier in 
the 2.7 series.  I'll check 2.7.0 and 2.7.1 to see.

> I tried your setup with the django-specific handler replaced by another 
> StreamHandler
> [...]
> and got what
> 
> $ python2.7 tmp_logging.py
> 2011-08-30 11:18:33,160: djfront.auth.facebook INFO <module> info-test
> $
> 
> which seems to be what you expected. So I'm confused, too...

I'll need to dig deeper.  Not that I realize this may not be a Python 
issue per-se, I'll do some more experimentation and ask on the django 
mailing list.  Thanks for your help.



More information about the Python-list mailing list