
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-02-06 23:53 byyselivanov, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| logging_01.patch | yselivanov,2014-02-06 23:53 | review | ||
| logging_02.patch | yselivanov,2014-09-12 23:07 | review | ||
| Messages (7) | |||
|---|---|---|---|
| msg210428 -(view) | Author: Yury Selivanov (yselivanov)*![]() | Date: 2014-02-06 23:53 | |
A bunch of logging methods accept optional parameter exc_info, that is supposed to be either 'True' or a tuple of three elements (type, exc, tb).If, however, someone passes an actual exception instance, Logger._log function will interpret it as True and get the current exception from sys.exc_info, ignoring the passed exception completely.Attached is a patch that fixes this: if exc_info is an instance of BaseException, Logger._log creates the tuple out of it automatically. | |||
| msg210436 -(view) | Author: Vinay Sajip (vinay.sajip)*![]() | Date: 2014-02-07 06:36 | |
I believe it's too late for feature changes in 3.4, so removing it from versions. | |||
| msg210437 -(view) | Author: Vinay Sajip (vinay.sajip)*![]() | Date: 2014-02-07 06:38 | |
It would be good if the patch addressed documentation changes, too :-) | |||
| msg210554 -(view) | Author: Yury Selivanov (yselivanov)*![]() | Date: 2014-02-07 20:54 | |
> I believe it's too late for feature changes in 3.4, so removing it from versions.Alright. Was worth a try ;)> It would be good if the patch addressed documentation changes, too :-)Sure, I'll add the documentation, when we start working on 3.5.Are you OK with the general idea of the patch? | |||
| msg210559 -(view) | Author: Vinay Sajip (vinay.sajip)*![]() | Date: 2014-02-07 21:29 | |
Yes - or I would have said something :-) | |||
| msg226851 -(view) | Author: Yury Selivanov (yselivanov)*![]() | Date: 2014-09-12 23:07 | |
Vinay,Please take a look at the second patch -- 'logging_02.patch' -- with updated docs | |||
| msg226886 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-09-14 20:29 | |
New changeset9d54903a84b5 by Vinay Sajip in branch 'default':Closes#20537: logging methods now accept an exception instance as well as a Boolean value or exception tuple. Thanks to Yury Selivanov for the patch.https://hg.python.org/cpython/rev/9d54903a84b5 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:58 | admin | set | github: 64736 |
| 2014-09-14 20:29:31 | python-dev | set | status: open -> closed nosy: +python-dev messages: +msg226886 resolution: fixed stage: resolved |
| 2014-09-12 23:07:27 | yselivanov | set | files: +logging_02.patch messages: +msg226851 |
| 2014-02-07 21:29:27 | vinay.sajip | set | messages: +msg210559 |
| 2014-02-07 20:54:24 | yselivanov | set | messages: +msg210554 |
| 2014-02-07 06:38:54 | vinay.sajip | set | messages: +msg210437 |
| 2014-02-07 06:36:44 | vinay.sajip | set | assignee:vinay.sajip messages: +msg210436 versions: - Python 3.4 |
| 2014-02-06 23:53:08 | yselivanov | create | |