The documentation says that the logging lib is optimized to use the %s formatting style. I can't remember where it is mentionned exactly, but I read it a few months ago.
%s
Edit - Found! https://docs.python.org/3/howto/logging-cookbook.html#formatting-styles Edit2 - (thanks to Robin Nemeth): https://docs.python.org/3/howto/logging.html#optimization
2.1m questions
2.1m answers
60 comments
57.0k users