This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: logging.exception doesn't accept custom exc_info
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: laimis, vinay.sajip
Priority: normal Keywords:

Created on 2015-01-06 00:54 by laimis, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg233496 - (view) Author: Laimis (laimis) Date: 2015-01-06 00:54
Documentation says, that "The arguments are interpreted as for debug()." But it's not true, because no matter what exc_info is passed to logging.exception(), exc_info is overwritten (kwargs['exc_info'] = 1) and later self.error is called. 
This is either documentation issue or behavior issue, because in the current implementation it's not possible to pass custom exc_info (e.g. full traceback) to logging.exception(), although documentation implies it should work the same as for info, warning, error, debug and others.
msg233517 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2015-01-06 11:15
2.7 documentation has now been updated. The behaviour has already been changed for Python 3.5 to forward any exc_info passed in (see Issue #20537).
History
Date User Action Args
2022-04-11 14:58:11adminsetgithub: 67364
2015-01-06 11:15:13vinay.sajipsetstatus: open -> closed
resolution: fixed
messages: + msg233517
2015-01-06 08:19:03berker.peksagsetnosy: + vinay.sajip
2015-01-06 00:54:53laimiscreate