New submission from INADA Naoki <songofaca...@gmail.com>:

When exception raised in logging, traceback is shown but it doesn't tell
me which logging code cause the error.

$ cat unusable_traceback.py 
import logging
logging.warn('%s %s', 1) # not enough arguments.

$ python unusable_traceback.py 
Traceback (most recent call last):
  File "/usr/lib/python2.6/logging/__init__.py", line 768, in emit
    msg = self.format(record)
  File "/usr/lib/python2.6/logging/__init__.py", line 648, in format
    return fmt.format(record)
  File "/usr/lib/python2.6/logging/__init__.py", line 436, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.6/logging/__init__.py", line 306, in getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string

----------
components: Library (Lib)
messages: 98981
nosy: naoki
severity: normal
status: open
title: traceback from logging is unusable.
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7869>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to