Skip to content

Commit 8a4d5a6

Browse files
committed
add logs to notificatinos
Signed-off-by: rafsaf <rafal.safin12@gmail.com>
1 parent 45ed4e7 commit 8a4d5a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

medichaser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,11 @@ def send_notification(
895895
) -> None:
896896
"""Send a notification with formatted appointments."""
897897
message = Notifier.format_appointments(appointments)
898+
if notifier is None:
899+
log.info("No notifier specified, skipping notification.")
900+
return
901+
902+
log.info("Sending notification to %s with title: %s", notifier, title)
898903
if notifier == "pushbullet":
899904
pushbullet_notify(message, title)
900905
elif notifier == "pushover":
@@ -905,6 +910,7 @@ def send_notification(
905910
xmpp_notify(message)
906911
elif notifier == "gotify":
907912
gotify_notify(message, title)
913+
log.info("Notification sent successfully.")
908914

909915

910916
def display_appointments(appointments: list[dict[str, Any]]) -> None:

0 commit comments

Comments
 (0)