diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 173f1097..5b6ff262 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -1267,7 +1267,7 @@ def notification_runner(): try: from changedetectionio import notification - notification.process_notification(n_object, datastore) + sent_obj = notification.process_notification(n_object, datastore) except Exception as e: logging.error("Watch URL: {} Error {}".format(n_object['watch_url'], str(e))) @@ -1281,7 +1281,7 @@ def notification_runner(): notification_debug_log += log_lines # Process notifications - notification_debug_log+= ["{} - SENDING {}".format(now.strftime("%Y/%m/%d %H:%M:%S,000"), json.dumps(n_object))] + notification_debug_log+= ["{} - SENDING - {}".format(now.strftime("%Y/%m/%d %H:%M:%S,000"), json.dumps(sent_obj))] # Trim the log length notification_debug_log = notification_debug_log[-100:] diff --git a/changedetectionio/notification.py b/changedetectionio/notification.py index b4c9ede2..ac510a8b 100644 --- a/changedetectionio/notification.py +++ b/changedetectionio/notification.py @@ -102,6 +102,10 @@ def process_notification(n_object, datastore): if log_value and 'WARNING' in log_value or 'ERROR' in log_value: raise Exception(log_value) + # Return what was sent for better logging + return {'title': n_title, + 'body': n_body, + 'body_format': n_format} # Notification title + body content parameters get created here.