mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
Change notification text format logger to exception
This commit is contained in:
parent
ad112e0a44
commit
e06210f21c
1 changed files with 5 additions and 5 deletions
|
@ -1155,7 +1155,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in script argument. Using fallback." % e)
|
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in script argument. Using fallback." % e)
|
||||||
script_args = []
|
script_args = []
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse custom script arguments: %s. Using fallback." % e)
|
logger.exception("Tautulli NotificationHandler :: Unable to parse custom script arguments: %s. Using fallback." % e)
|
||||||
script_args = []
|
script_args = []
|
||||||
|
|
||||||
elif agent_id == 25:
|
elif agent_id == 25:
|
||||||
|
@ -1172,7 +1172,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in webhook header data. Using fallback." % e)
|
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in webhook header data. Using fallback." % e)
|
||||||
subject = ''
|
subject = ''
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse custom webhook header data: %s. Using fallback." % e)
|
logger.exception("Tautulli NotificationHandler :: Unable to parse custom webhook header data: %s. Using fallback." % e)
|
||||||
subject = ''
|
subject = ''
|
||||||
|
|
||||||
if body:
|
if body:
|
||||||
|
@ -1188,7 +1188,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in webhook body data. Using fallback." % e)
|
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in webhook body data. Using fallback." % e)
|
||||||
body = ''
|
body = ''
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse custom webhook body data: %s. Using fallback." % e)
|
logger.exception("Tautulli NotificationHandler :: Unable to parse custom webhook body data: %s. Using fallback." % e)
|
||||||
body = ''
|
body = ''
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@ -1198,7 +1198,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in notification subject. Using fallback." % e)
|
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in notification subject. Using fallback." % e)
|
||||||
subject = str(default_subject).format(**parameters)
|
subject = str(default_subject).format(**parameters)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse custom notification subject: %s. Using fallback." % e)
|
logger.exception("Tautulli NotificationHandler :: Unable to parse custom notification subject: %s. Using fallback." % e)
|
||||||
subject = str(default_subject).format(**parameters)
|
subject = str(default_subject).format(**parameters)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -1207,7 +1207,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in notification body. Using fallback." % e)
|
logger.error("Tautulli NotificationHandler :: Unable to parse parameter %s in notification body. Using fallback." % e)
|
||||||
body = str(default_body).format(**parameters)
|
body = str(default_body).format(**parameters)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Tautulli NotificationHandler :: Unable to parse custom notification body: %s. Using fallback." % e)
|
logger.exception("Tautulli NotificationHandler :: Unable to parse custom notification body: %s. Using fallback." % e)
|
||||||
body = str(default_body).format(**parameters)
|
body = str(default_body).format(**parameters)
|
||||||
|
|
||||||
return subject, body, script_args
|
return subject, body, script_args
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue