Python Logging Benchmark

1 · Roman Soldatow · Sept. 8, 2019, 5:46 p.m.
If you have a heavy logging application, you might want to take into consideration to use the %-format strings for logging.The Python logging module recommends to use the %-format.But I guess most of the developers will prefer the f-string format, which came with the Python 3.6 release, because it simply easier to read.My question was: Which impact does it have on performance? In case, we use logging with string concatenation.So, I wrote a short script to “benchmark” it (and yes, I know it is no...