Message412496
@rhettinger @tinchester I definitely see now that f-strings should have a place in logging.
But do you agree that f-strings don't mix 100% safely with the current logger API?
What are your thoughts on a safer set of logger functions (see my comments above, https://bugs.python.org/issue46200#msg409505)
Just throwing an additional alternative out there: instead of the @overload approach, one could have 2 logger function families:
debugs(s: str) # s-prefix indicates simply logging a string (no formatting done by logger!)
debugf(s: LiteralStr, *args, **kwargs) # f prefix indicates logger does the formatting. (no formatting done by user!)
@vinay.sajip what are your thoughts on the discussion above? |
|
Date |
User |
Action |
Args |
2022-02-04 07:23:18 | ariebovenberg | set | recipients:
+ ariebovenberg, rhettinger, vinay.sajip, eric.smith, docs@python, tinchester, erlendaasland |
2022-02-04 07:23:18 | ariebovenberg | set | messageid: <1643959398.79.0.615987344006.issue46200@roundup.psfhosted.org> |
2022-02-04 07:23:18 | ariebovenberg | link | issue46200 messages |
2022-02-04 07:23:18 | ariebovenberg | create | |
|