Issue36532
Created on 2019-04-05 05:14 by spaceman_spiff, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12693 | closed | python-dev, 2019-04-05 05:15 | |
| Messages (4) | |||
|---|---|---|---|
| msg339470 - (view) | Author: (spaceman_spiff) * | Date: 2019-04-05 05:14 | |
It was not quite clear how to use the logging library with the new str.format style so I added an example in the logging cookbook |
|||
| msg339504 - (view) | Author: Vinay Sajip (vinay.sajip) * ![]() |
Date: 2019-04-05 15:25 | |
But there is an example in the cookbook already: https://docs.python.org/3/howto/logging-cookbook.html#use-of-alternative-formatting-styles It's right there in the first code sample in that section. You might want to amend your change to point to this section from the one where you want to make the change. |
|||
| msg339513 - (view) | Author: Fred Drake (fdrake) ![]() |
Date: 2019-04-05 19:07 | |
Good catch, Vinay! Thanks. |
|||
| msg339526 - (view) | Author: (spaceman_spiff) * | Date: 2019-04-06 06:44 | |
I was under the impression that this was all it takes to use loggers with the normal string.format syntax.
e.g.:
log.info('{}', 'Test')
Turns out when I tested it I used f-strings in the first parameters - so I got it wrong.
Imho this can be closed and the pr rejected.
Sorry for wasting your time :)
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:13 | admin | set | github: 80713 |
| 2019-04-06 06:44:03 | spaceman_spiff | set | status: open -> closed messages:
+ msg339526 |
| 2019-04-05 19:07:11 | fdrake | set | messages: + msg339513 |
| 2019-04-05 15:25:32 | vinay.sajip | set | messages: + msg339504 |
| 2019-04-05 06:29:00 | xtreak | set | nosy:
+ vinay.sajip versions: - Python 3.5, Python 3.6, Python 3.9 |
| 2019-04-05 05:48:28 | fdrake | set | nosy:
+ fdrake |
| 2019-04-05 05:15:28 | python-dev | set | keywords:
+ patch stage: patch review pull_requests: + pull_request12618 |
| 2019-04-05 05:14:22 | spaceman_spiff | set | type: enhancement |
| 2019-04-05 05:14:14 | spaceman_spiff | create | |
