1
0
Fork 0
forked from github/pelican

Better error logging if a plugin refuses to load

This commit is contained in:
MinchinWeb 2024-01-14 13:45:51 -07:00
commit f0beb81a97
2 changed files with 8 additions and 3 deletions

View file

@ -80,7 +80,8 @@ class Pelican:
plugin.register()
self.plugins.append(plugin)
except Exception as e:
logger.error("Cannot register plugin `%s`\n%s", name, e)
logger.error("Cannot register plugin `%s`\n%s", name, e, stacklevel=3)
print(e.stacktrace)
self.settings["PLUGINS"] = [get_plugin_name(p) for p in self.plugins]