forked from 0x2620/pandora
logError: log HTTP_USER_AGENT
include user agent in error text
This commit is contained in:
parent
3ad9d4821b
commit
8b0459592c
1 changed files with 2 additions and 1 deletions
|
@ -34,8 +34,9 @@ def logError(request, data):
|
||||||
if 'text' in data:
|
if 'text' in data:
|
||||||
if len(url) > 1000:
|
if len(url) > 1000:
|
||||||
url = url[:997] + '...'
|
url = url[:997] + '...'
|
||||||
|
text = data['text'] + '\n\n' + request.META.get('HTTP_USER_AGENT', '')[:4096]
|
||||||
l = models.Log(
|
l = models.Log(
|
||||||
text=data['text'],
|
text=text,
|
||||||
line=int(data.get('line', 0)),
|
line=int(data.get('line', 0)),
|
||||||
url=url
|
url=url
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue