Better way to log the impacted plugin and action in case of uncaught exceptions in requests

This commit is contained in:
Fabio Manganiello 2019-01-27 17:51:07 +01:00
parent 947fc8f583
commit 339d1eb132

View file

@ -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: