logError: log HTTP_USER_AGENT

include user agent in error text
This commit is contained in:
Will Thompson 2015-05-20 12:38:49 +02:00 committed by j
parent 3ad9d4821b
commit 8b0459592c

View file

@ -34,8 +34,9 @@ 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['text'],
text=text,
line=int(data.get('line', 0)),
url=url
)