Use lazy evaluation with logging

Changing the format to old style %() because logging doesn't support the new {} style by default