Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12628

Re: Help me understand this logging config

From Vinay Sajip <vinay_sajip@yahoo.co.uk>
Subject Re: Help me understand this logging config
Date 2011-09-02 09:58 +0000
References <bdf729a3-5f68-46fb-b6ae-27dceed5af77@18g2000yqu.googlegroups.com> <mailman.566.1314696279.27778.python-list@python.org> <roy-7F52BC.08392630082011@news.panix.com>
Newsgroups comp.lang.python
Message-ID <mailman.698.1314957525.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Aug 30, 1:39 pm, Roy Smith <r...@panix.com> wrote:
> Oh, my, it turns out that django includes:
> 
> # This is a copy of the Pythonlogging.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.

They're not identical, but should be functionally equivalent. I'm not able to
reproduce your results: I copied the "loggers" part of your config into a Django
1.3 project, and from a manage.py shell session:

Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import logging
>>> logger = logging.getLogger('djfront.auth.facebook')
>>> logger.debug('Debug')
>>> logger.info('Info')
2011-09-02 10:51:13,445 INFO     djfront.auth.facebook Info
>>> 

... as expected.

Since it's Python 2.6, it should be using the dictconfig which ships with Django
1.3.

Regards,

Vinay Sajip

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Help me understand this logging config Roy Smith <roy@panix.com> - 2011-08-29 10:53 -0700
  Re: Help me understand this logging config Peter Otten <__peter__@web.de> - 2011-08-30 11:24 +0200
    Re: Help me understand this logging config Roy Smith <roy@panix.com> - 2011-08-30 08:39 -0400
      Re: Help me understand this logging config Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2011-09-02 02:56 -0700
      Re: Help me understand this logging config Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2011-09-02 09:58 +0000
      Re: Help me understand this logging config Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2011-09-02 03:00 -0700
  Re: Help me understand this logging config anand jeyahar <anand.ibmgsi@gmail.com> - 2011-08-30 17:01 +0530

csiph-web