Tweak pagerduty colors and log all payloads
This commit is contained in:
parent
f4a36a3ce7
commit
29757b2e7d
2 changed files with 14 additions and 4 deletions
|
|
@ -1,4 +1,6 @@
|
|||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
from typing import Any, Dict, Optional, cast
|
||||
|
||||
import uvicorn
|
||||
|
|
@ -87,6 +89,8 @@ async def pagerduty_hook(
|
|||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND, detail="Unknown routing key"
|
||||
)
|
||||
payload_str = json.dumps(payload, sort_keys=True, indent=2)
|
||||
logging.info(f"received pagerduty payload: \n {payload_str}")
|
||||
msg_plain, msg_formatted = pagerduty.parse_pagerduty_event(payload)
|
||||
await matrix_client.room_send(
|
||||
room_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue