From 339d1eb132a1a14efbac6bbdf52dcd82ae363151 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 27 Jan 2019 17:51:07 +0100 Subject: [PATCH] Better way to log the impacted plugin and action in case of uncaught exceptions in requests --- platypush/message/request/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platypush/message/request/__init__.py b/platypush/message/request/__init__.py index 6bf4aa180..4d3cff627 100644 --- a/platypush/message/request/__init__.py +++ b/platypush/message/request/__init__.py @@ -217,8 +217,9 @@ class Request(Message): # Retry mechanism plugin.logger.exception(e) logger.warning(('Uncaught exception while processing response ' + - 'from action {}.{}: {}').format( - plugin, self.action, str(e))) + 'from action [{}] from plugin {}: {}').format( + self.action, plugin.__class__.__name__, + str(e))) errors = errors or [] if str(e) not in errors: