Skip to content

Commit

Permalink
limit-logging (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 authored Jan 31, 2023
1 parent 6ea201b commit b1148fc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fyle_partner_dashboard_api/logging_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ def __init__(self, get_response):
self.get_response = get_response

def __call__(self, request):
response = self.get_response(request)
if response.status_code >= 400:
if 'data' in response.__dict__:
logger.error('%s %s', request.build_absolute_uri(), str(response.data).replace('\n', ''))
return response
return self.get_response(request)

def process_exception(self, request, exception):
if not settings.DEBUG:
Expand Down

0 comments on commit b1148fc

Please sign in to comment.