mirror of
https://github.com/django/daphne.git
synced 2025-04-20 00:32:09 +03:00
Added debug logs for the inbound_email path
This commit is contained in:
parent
9838a173d7
commit
34491bc474
|
@ -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
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user