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

SourceForge.net noreply at sourceforge.net
Sat May 5 20:11:13 CEST 2007


Bugs item #1713535, was opened at 2007-05-05 20:01
Message generated for change (Settings changed) made by billiejoex
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: Open
Resolution: None
>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)

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

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