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.
This commit is contained in:
David McDonald
2021-11-12 14:06:38 +00:00
parent 770d323274
commit c98996a461

View File

@@ -834,7 +834,7 @@ def _duplicate_update_warning(notification, status):
current_app.logger.info( current_app.logger.info(
( (
'Duplicate callback received. Notification id {id} received a status update to {new_status}' '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( ).format(
id=notification.id, id=notification.id,
old_status=notification.status, old_status=notification.status,