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: Making msg optional on logging.exception() and similar variants
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Sworddragon, vinay.sajip
Priority: normal Keywords:

Created on 2013-08-24 11:33 by Sworddragon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg196073 - (view) Author: (Sworddragon) Date: 2013-08-24 11:33
For logging.exception() and similar variants the msg argument must be passed but on a formation the LogRecord "message" is not mandatory. In this case wouldn't it be better to make the msg argument optional? At default it could be None or ''.
msg196597 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-08-30 23:26
No, because in the general case, it would be useful to provide a message. If you don't want to, you can specify '', but there's no reason to make that the default.
History
Date User Action Args
2022-04-11 14:57:50adminsetgithub: 63025
2013-09-14 07:24:12vinay.sajipsetstatus: pending -> closed
2013-08-30 23:26:27vinay.sajipsetstatus: open -> pending

nosy: + vinay.sajip
messages: + msg196597

resolution: not a bug
2013-08-24 11:33:10Sworddragoncreate