From 0250a48c2cd4c33f98d197a24ca1ac7bced3aabc Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Sun, 11 Sep 2022 17:01:34 +0200 Subject: [PATCH] Log loaded plugins If a plugin was built for a different gotify version, then plugin.Open may throw an unrecoverable error. This log statement should help debugging which plugin is causing the error. See #510 --- plugin/manager.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/manager.go b/plugin/manager.go index 011f081..1df99ed 100644 --- a/plugin/manager.go +++ b/plugin/manager.go @@ -227,6 +227,8 @@ func (m *Manager) loadPlugins(directory string) error { } for _, f := range pluginFiles { pluginPath := filepath.Join(directory, "./", f.Name()) + + fmt.Println("Loading plugin", pluginPath) pRaw, err := plugin.Open(pluginPath) if err != nil { return pluginFileLoadError{f.Name(), err}