Added debug logs for the inbound_email path

This commit is contained in:
mehernosh 2020-07-07 03:13:13 +05:30
parent 9838a173d7
commit 34491bc474
2 changed files with 15 additions and 1 deletions

View File

@ -65,6 +65,19 @@ class WebRequest(http.Request):
@inlineCallbacks
def process(self):
try:
if "inbound_email" in self.path:
from uuid import uuid4
groupid=f"@debugging@ inbound_email {uuid4()}"
logger.warning(f"{groupid} About to serve {self.path}")
try:
for k, v in self.requestHeaders():
logger.warning(f"{groupid} Header Key: {k}")
logger.warning(f"{groupid} Header Value: {v}")
except Exception:
logger.error(f"{groupid} Parsing headers failed")
except Exception:
logger.error("Checking for inbound_email in path failed")
try:
self.request_start = time.time()
# Get upgrade header

View File

@ -54,10 +54,11 @@ class Server(object):
websocket_handshake_timeout=5,
application_close_timeout=10,
ready_callable=None,
server_name="Daphne",
server_name="Daphne++",
# Deprecated and does not work, remove in version 2.2
ws_protocols=None,
):
logger.warning("Daphne++ is running!")
self.application = application
self.endpoints = endpoints or []
self.listeners = []