From 7950078e6ea5c4bcce4633362002e3729ac9ec67 Mon Sep 17 00:00:00 2001 From: Jeremy Kun Date: Sat, 6 Aug 2022 14:24:58 -0700 Subject: [PATCH] When plugin loading fails, include stack trace. This helped me track down https://github.com/google/yapf/issues/983#issuecomment-1207283111, and it seems like it should be the default behavior when logging is enabled. --- pylsp/config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylsp/config/config.py b/pylsp/config/config.py index 5637ca60..4ddb4988 100644 --- a/pylsp/config/config.py +++ b/pylsp/config/config.py @@ -32,7 +32,7 @@ def _hookexec( try: return self._inner_hookexec(hook_name, methods, kwargs, firstresult) except Exception as e: # pylint: disable=broad-except - log.warning(f"Failed to load hook {hook_name}: {e}") + log.warning(f"Failed to load hook {hook_name}: {e}", exc_info=True) return []