Skip to content

Commit

Permalink
🚨 lint: use lazy formatting in logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeris1One committed Nov 14, 2023
1 parent 0527978 commit 273a7ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/monitoring/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, bot: Gunibot):
self.loop.start()
return
else:
self.logger.warning(f"Monitoring ping failed {i+1} times")
self.logger.warning("Monitoring ping failed %s times", i+1)
time.sleep(5)
self.logger.error("Monitoring disabled due to ping failure")

Expand All @@ -51,7 +51,7 @@ def ping_monitoring(self):
if (request.status_code != 200 or request.json()["ok"] != True):
raise requests.exceptions.RequestException(request.json()["msg"])
except requests.exceptions.RequestException as e:
self.logger.error(f"Error while sending heartbeat to monitoring: {e}")
self.logger.error("Error while sending heartbeat to monitoring: %s", e)
return False
return True

Expand Down

0 comments on commit 273a7ce

Please sign in to comment.