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
This commit is contained in:
Jannis Mattheis 2022-09-11 17:01:34 +02:00
parent c4e63863f7
commit 0250a48c2c
1 changed files with 2 additions and 0 deletions

View File

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