[ python-Bugs-1713535 ] Error inside logging module documentation

SourceForge.net noreply at sourceforge.net
Sat May 5 20:57:17 CEST 2007


Bugs item #1713535, was opened at 2007-05-05 18:01
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1713535&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: billiejoex (billiejoex)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error inside logging module documentation

Initial Comment:
http://docs.python.org/lib/module-logging.html

Inside the explanation of logging.debug an example code is showed:

 FORMAT = "%(asctime)-15s %(clientip)s %(user)-8s %(message)s"
 logging.basicConfig(format=FORMAT)
 dict = { 'clientip' : '192.168.0.1', 'user' : 'fbloggs' }
 logging.warning("Protocol problem: %s", "connection reset", extra=d)


In the code "dict" is created but never used. 
When logging.warning is called the author use the argument 'd' instead of 'dict' and no reference to 'd' exists:

 logging.warning("Protocol problem: %s", "connection reset", extra=d)

----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2007-05-05 18:57

Message:
Logged In: YES 
user_id=849994
Originator: NO

Thanks for the report, fixed in rev. 55154, 55155.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1713535&group_id=5470


More information about the Python-bugs-list mailing list