refactor: don't use f-string on logging statements

The strings are now be formatted if the logging level is enabled.
This commit is contained in:
jo 2023-02-26 12:01:59 +01:00 committed by Kyle Robbertze
parent c414068c16
commit 861698987c
23 changed files with 94 additions and 84 deletions

View file

@ -36,7 +36,7 @@ class MessageHandler(ConsumerMixin):
]
def on_message(self, body, message):
logger.debug(f"received message: {body}")
logger.debug("received message: %s", body)
try:
try:
body = body.decode()
@ -45,7 +45,7 @@ class MessageHandler(ConsumerMixin):
payload = json.loads(body)
command = payload["event_type"]
logger.info(f"handling command: {command}")
logger.info("handling command: %s", command)
if command in (
"update_schedule",
@ -66,7 +66,7 @@ class MessageHandler(ConsumerMixin):
self.recorder_queue.put(message.payload)
else:
logger.warning(f"invalid command: {command}")
logger.warning("invalid command: %s", command)
except Exception as exception:
logger.exception(exception)