From 3fa0819e04b6a433e6f8d696a298ee5530afc034 Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Wed, 18 Jun 2025 04:24:37 -0700 Subject: [PATCH] Fixed G004 (logging-f-string): Logging statement uses f-string --- management/daemon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/management/daemon.py b/management/daemon.py index 6658af09..67a5d7dc 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -162,7 +162,7 @@ def login(): "api_key": auth_service.create_session_key(email, env, type='login'), } - app.logger.info(f"New login session created for {email}") + app.logger.info("New login session created for %s", email) # Return. return json_response(resp) @@ -171,7 +171,7 @@ def login(): def logout(): try: email, _ = auth_service.authenticate(request, env, logout=True) - app.logger.info(f"{email} logged out") + app.logger.info("%s logged out", email) except ValueError: pass finally: @@ -771,7 +771,7 @@ def log_failed_login(request): # We need to add a timestamp to the log message, otherwise /dev/log will eat the "duplicate" # message. - app.logger.warning( f"Mail-in-a-Box Management Daemon: Failed login attempt from ip {ip} - timestamp {time.time()}") + app.logger.warning("Mail-in-a-Box Management Daemon: Failed login attempt from ip %s - timestamp %s", ip, time.time()) # APP