Skip to content

Commit

Permalink
add logging instructions for all channels
Browse files Browse the repository at this point in the history
  • Loading branch information
mourginakis committed Oct 23, 2023
1 parent 2ca10ae commit d209b80
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions node_monitor/node_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def broadcast_alerts(self) -> None:
# - - - - - - - - - - - - - - - - -
if preferences['notify_email'] == True:
recipients = email_recipients[node_provider_id]
logging.info(f"Sending alert email to {recipients}...")
logging.info(f"Sending alert email message to {recipients}...")
self.email_bot.send_emails(recipients, subject, message)
if preferences['notify_slack'] == True:
if self.slack_bot is not None:
Expand All @@ -123,6 +123,7 @@ def broadcast_alerts(self) -> None:
if preferences['notify_telegram_chat'] == True:
if self.telegram_bot is not None:
chat_id = channels[node_provider_id]['telegram_chat_id']
logging.info(f"Sending alert telegram message to {chat_id}...")
self.telegram_bot.send_message(chat_id, message)
# - - - - - - - - - - - - - - - - -

Expand Down Expand Up @@ -151,16 +152,17 @@ def broadcast_status_report(self) -> None:
# - - - - - - - - - - - - - - - - -
if preferences['notify_email'] == True:
recipients = email_recipients[node_provider_id]
logging.info(f"Sending status_report email to {recipients}...")
logging.info(f"Sending status report email to {recipients}...")
self.email_bot.send_emails(recipients, subject, message)
if preferences['notify_slack'] == True:
if self.slack_bot is not None:
channel_name = channels[node_provider_id]['slack_channel_name']
logging.info(f"Sending status_report slack message to {channel_name}...")
logging.info(f"Sending status report slack message to {channel_name}...")
self.slack_bot.send_message(channel_name, message)
if preferences['notify_telegram_chat'] == True:
if self.telegram_bot is not None:
chat_id = channels[node_provider_id]['telegram_chat_id']
logging.info(f"Sending status report telegram message to {chat_id}...")
self.telegram_bot.send_message(chat_id, message)
# - - - - - - - - - - - - - - - - -

Expand Down

0 comments on commit d209b80

Please sign in to comment.