Python - Logger string formatting

Viewed 8572

As I understand it,

 'hello {0}'.format("world")

is slower than:

"hello %s" % "world"

My question is, how does logger format the strings when passed like so:

logger.debug("hello %s", "world")

And assuming the logs will never be turned off would it be better to do:

logger.debug("hello %s" % "world")
3 Answers
Related