✨ extra logging parameter to add plugin identifier

Will allow to identify logged exceptions originating from calling
plugins, but also log plugin identifiers directly in the log message
if so desired.
This commit is contained in:
Gina Häußge committed 2019-04-05 17:47:36 +02:00
1 parent 34c30ed73f
commit b353c4eee2
20 files changed
+177 -95

No files matched your search

@@ -902,7 +902,8 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
reconnect_hooks.extend(filter(lambda x: isinstance(x, basestring), result))
except:
self._logger.exception("Error while retrieving additional hooks for which a "
"reconnect is required from plugin {name}".format(**locals()))
"reconnect is required from plugin {name}".format(**locals()),
extra=dict(plugin=name))
return reconnect_hooks