From 3ba65f010620c1221225ff50f386109a3b178c66 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Mon, 17 Aug 2026 16:07:40 +0200 Subject: [PATCH] Removed logging --- cloud/APIs/twilio.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cloud/APIs/twilio.py b/cloud/APIs/twilio.py index 2c360d1..499ddf9 100644 --- a/cloud/APIs/twilio.py +++ b/cloud/APIs/twilio.py @@ -1,9 +1,6 @@ import os -import logging from twilio.rest import Client -logger = logging.getLogger(__name__) - def send_alert_sms(to_phone: str, room_title: str, room_link: str = None, client_email: str = None) -> bool: """ Sends an SMS alert using Twilio notifying the client of an issue and support room creation. @@ -13,11 +10,11 @@ def send_alert_sms(to_phone: str, room_title: str, room_link: str = None, client from_phone = os.environ.get("TWILIO_PHONE_NUMBER") # Requires your Twilio sender phone number if not account_sid or not auth_token or not from_phone: - logger.error("Twilio environment variables (TWILIO_SID, TWILIO_ACCOUNT_SECRET, TWILIO_PHONE_NUMBER) missing.") + print("Twilio environment variables (TWILIO_SID, TWILIO_ACCOUNT_SECRET, TWILIO_PHONE_NUMBER) missing.") return False if not to_phone: - logger.warning("No recipient phone number provided for SMS.") + print("No recipient phone number provided for SMS.") return False # --- PRINT LINK/INFO BEFORE SENDING --- @@ -51,8 +48,8 @@ def send_alert_sms(to_phone: str, room_title: str, room_link: str = None, client from_=from_phone, to=to_phone ) - logger.info(f"SMS sent successfully to {to_phone}. Message SID: {message.sid}") + print(f"SMS sent successfully to {to_phone}. Message SID: {message.sid}") return True except Exception as e: - logger.exception(f"Failed to send SMS via Twilio to {to_phone}: {e}") + print(f"Failed to send SMS via Twilio to {to_phone}: {e}") return False \ No newline at end of file