From c32503e1af31375e79998ed22de1d2b05d687f2a Mon Sep 17 00:00:00 2001 From: j Date: Tue, 27 Feb 2018 19:11:08 +0530 Subject: [PATCH] log full error url --- pandora/log/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pandora/log/views.py b/pandora/log/views.py index 12c339208..556cc62a7 100644 --- a/pandora/log/views.py +++ b/pandora/log/views.py @@ -34,15 +34,16 @@ def logError(request, data): if 'text' in data: if len(url) > 1000: url = url[:997] + '...' - text = data['text'] + '\n\n' + request.META.get('HTTP_USER_AGENT', '')[:4096] - l = models.Log( + text = data.get('url', '') + '\n\n' + \ + data['text'] + '\n\n' + request.META.get('HTTP_USER_AGENT', '')[:4096] + log = models.Log( text=text, line=int(data.get('line', 0)), url=url ) if user: - l.user = user - l.save() + log.user = user + log.save() response = json_response() return render_to_json_response(response) actions.register(logError, cache=False)