Python's logging functions allow you to pass them multiple arguments that they can interpolate for you. So you have a choice:
logger.info("Something %s this way comes!" % "wicked")
or
logger.info("Something %s this way comes!", "wicked")
But why choose one over the other? Is it simply a matter of letting errors happen in the logger as opposed to in the program that's being logged, or is there something else to it?
It's a matter of performance :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With