From f4e65ae7b8a065817647f07b913187da48885078 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 25 Oct 2011 15:47:37 +0200 Subject: [PATCH] save log messages --- pandora/app/views.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pandora/app/views.py b/pandora/app/views.py index 350dfcbaa..c6c86a685 100644 --- a/pandora/app/views.py +++ b/pandora/app/views.py @@ -95,8 +95,9 @@ def redirect_url(request, url): def log(request): ''' param data { - type: 'ERROR', 'WARN' - message: text + url: url + line: line + text: text } return { status: ... @@ -111,11 +112,12 @@ def log(request): user = request.user else: user = None - if 'message' in data: + if 'text' in data: l = models.Log( user=user, - type=data.get('type', 'ERROR'), - message=data['message'] + text=data['text'], + line=int(data.get('line', 0)), + url=data.get('url', '') ) l.save() response = json_response()