From c98996a46140487def3f5d33a451e23138978879 Mon Sep 17 00:00:00 2001 From: David McDonald Date: Fri, 12 Nov 2021 14:06:38 +0000 Subject: [PATCH] Improve log message searchability for duplicate receipts There were two problems with the existing message. 1. There was no space between the new status and the time taken which made reading and searching harder 2. They key bits of information (before and after status) were separated by the time taken (which will always be unique) meaning you couldn't do an easy search for a message that is say in delivered being attempted to be set to temporary-failure. --- app/dao/notifications_dao.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index 325cd076a..e5b61e3d7 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -834,7 +834,7 @@ def _duplicate_update_warning(notification, status): current_app.logger.info( ( 'Duplicate callback received. Notification id {id} received a status update to {new_status}' - '{time_diff} after being set to {old_status}. {type} sent by {sent_by}' + ' from {old_status} for {type} sent by {sent_by}. This happened {time_diff} after being first set.' ).format( id=notification.id, old_status=notification.status,