Support Template Strings for log messages (#1397)
Implements support for python 3.14 template strings:
logger.debug(t"obj = {large_obj}")
Will evaluate lazily, e.g. if the minimum log level means no debug messages are logged, the large_obj will not be converted to string.
Thank you for this initial implementation. This seems like an excellent solution to compensate for the planned removal of **kwargs as a formatting argument.
Please allow me not to merge this PR immediately because I want to think a little about possible integrations of t-strings, but it seems very fine to me as is.
Of course! Let me know if you want any changes.
2 month reminder :). I read in a different PR that you are working on some larger refactoring, but wouldn't it make sense to get the simpler things that are already ready merged and maybe make a minor release with them? I would sure enjoy the ability to use logger.debug(t"obj = {large_obj}") in my python 3.14 projects :).