Skip to content

Commit 7f227bb

Browse files
committed
Revert log suppression changes I did for debugging the issue more see HEA-752
1 parent bc65db7 commit 7f227bb

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

apps/common/consumers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ async def connect(self):
6262
target_url,
6363
max_size=10485760,
6464
ping_interval=20,
65-
open_timeout=30, # Default is 10 sec
6665
subprotocols=subprotocols if subprotocols else None,
6766
)
6867
logger.info("Connected to upstream")

hea/settings/base.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@
253253
},
254254
"filters": {
255255
"require_debug_false": {"()": "django.utils.log.RequireDebugFalse"},
256+
"suppress_ws_pings": {
257+
"()": "common.logging_filters.SuppressWebSocketPings",
258+
},
259+
"suppress_revproxy_noise": {
260+
"()": "common.logging_filters.SuppressRevProxyNoise",
261+
},
256262
},
257263
"handlers": {
258264
"logfile": {
@@ -269,6 +275,7 @@
269275
"stream": sys.stdout,
270276
"class": "logging.StreamHandler",
271277
"formatter": env.str("LOG_FORMATTER", "standard"),
278+
"filters": ["suppress_ws_pings", "suppress_revproxy_noise"],
272279
},
273280
"mail_admins": {
274281
"level": "ERROR",
@@ -286,6 +293,40 @@
286293
"urllib3": {"handlers": ["console", "logfile"], "level": "INFO", "propagate": False},
287294
"common.models": {"handlers": ["console", "logfile"], "level": "INFO", "propagate": False},
288295
"common.signals": {"handlers": ["console", "logfile"], "level": "INFO", "propagate": False},
296+
"uvicorn": {
297+
"handlers": ["console"],
298+
"level": "INFO",
299+
"propagate": False,
300+
},
301+
"uvicorn.error": {
302+
"handlers": ["console"],
303+
"level": "DEBUG",
304+
"propagate": False,
305+
"filters": ["suppress_ws_pings"],
306+
},
307+
"uvicorn.access": {
308+
"handlers": ["console"],
309+
"level": "INFO",
310+
"propagate": False,
311+
},
312+
"revproxy": {
313+
"handlers": ["console"],
314+
"level": "INFO",
315+
"propagate": False,
316+
"filters": ["suppress_revproxy_noise"],
317+
},
318+
"revproxy.view": {
319+
"handlers": ["console"],
320+
"level": "INFO",
321+
"propagate": False,
322+
"filters": ["suppress_revproxy_noise"],
323+
},
324+
"revproxy.response": {
325+
"handlers": ["console"],
326+
"level": "INFO",
327+
"propagate": False,
328+
"filters": ["suppress_revproxy_noise"],
329+
},
289330
},
290331
# Keep root at DEBUG and use the `level` on the handler to control logging output,
291332
# so that additional handlers can be used to get additional detail, e.g. `common.resources.LoggingResourceMixin`

0 commit comments

Comments
 (0)