From 5a77b1b59ee8306d71b7bec449990374bbdd68a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 29 Feb 2012 14:12:54 +0100 Subject: [PATCH] Log when message has disappeared --- trans/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trans/views.py b/trans/views.py index 00d80d3c9..351434332 100644 --- a/trans/views.py +++ b/trans/views.py @@ -7,6 +7,9 @@ from django.contrib import messages from trans.models import Project, SubProject, Translation, Unit from trans.forms import TranslationForm +import logging + +logger = logging.getLogger('weblate') def home(request): projects = Project.objects.all() @@ -68,6 +71,7 @@ def translate(request, project, subproject, lang): # Check and save return HttpResponseRedirect('%s?type=%s&oldpos=%d' % (obj.get_translate_url(), rqtype, pos)) except Unit.DoesNotExist: + logger.error('message %s disappeared!', form.cleaned_data['checksum']) messages.add_message(request, messages.ERROR, _('Message you wanted to translate is no longer available!')) # If we failed to get unit above or on no POST