webhook fixes

This commit is contained in:
Roman Davydov
2024-01-13 00:48:38 +03:00
parent fa5968274d
commit d9bdccfde9
2 changed files with 3 additions and 2 deletions

View File

@@ -22,5 +22,4 @@ class Webhook(object):
elif self.method.lower() == "post":
requests.post(url=url)
else:
raise ValueError("Invalid method., use POST or GET")
raise ValueError("Invalid method, use POST or GET")

View File

@@ -230,6 +230,8 @@ class GlobalFormatter(logging.Formatter):
if (
self.settings.webhook is not None
and skip_webhook is False
and self.settings.webhook.endpoint
!= "https://example.com/webhook"
):
self.settings.webhook.send(record.msg, record.event)