home: Improve logging for narrow parsing exceptions.

This now includes the request and (and thus the related metadata).
This commit is contained in:
Tim Abbott
2018-05-20 18:47:43 -07:00
parent 9360af37d4
commit 44b3aeb08d

View File

@@ -116,7 +116,7 @@ def home_real(request: HttpRequest) -> HttpResponse:
user_profile, narrow_stream_name)
narrow = [["stream", narrow_stream.name]]
except Exception:
logging.exception("Narrow parsing")
logging.exception("Narrow parsing exception", extra=dict(request=request))
if narrow_stream is not None and narrow_topic is not None:
narrow.append(["topic", narrow_topic])