diff --git a/mreg/middleware/logging_http.py b/mreg/middleware/logging_http.py index cb75e048..c4f37468 100644 --- a/mreg/middleware/logging_http.py +++ b/mreg/middleware/logging_http.py @@ -148,9 +148,12 @@ def log_response( username = request.user.username + user_agent = self._get_request_header(request, "user-agent", "HTTP_USER_AGENT") + mreg_logger.bind( user=username, method=request.method, + user_agent=user_agent, status_code=status_code, status_label=status_label, path=request.path_info,