Пример #1
0
    def __call__(self, request):
        request_info = json_logging.RequestInfo(request)
        request.request_info = request_info

        response = self.get_response(request)

        request_info.update_response_status(response)
        self.request_logger.info('', extra={'request_info': request_info})

        return response
Пример #2
0
 def before_request():
     g.request_info = json_logging.RequestInfo(_current_request)
Пример #3
0
 def before_request():
     if is_not_match_any_pattern(_current_request.path, exclude_url_patterns):
         g.request_info = json_logging.RequestInfo(_current_request)
Пример #4
0
 def before_request(request):
     request['request_info'] = json_logging.RequestInfo(request)
Пример #5
0
 def before_request(request):
     if is_not_match_any_pattern(request.path, exclude_url_patterns):
         request.ctx.request_info = json_logging.RequestInfo(request)