diff --git a/backend/core/plugin/hub.go b/backend/core/plugin/hub.go index 6788c905753..a7f9c9f2c1a 100644 --- a/backend/core/plugin/hub.go +++ b/backend/core/plugin/hub.go @@ -74,10 +74,13 @@ func FindPluginNameBySubPkgPath(subPkgPath string) (string, errors.Error) { func InitPlugins(basicRes context.BasicRes) { for pluginName, pluginMeta := range plugins { + basicRes.GetLogger().Info("try to init plugin: %s", pluginName) if pluginEntry, ok := pluginMeta.(PluginInit); ok { err := pluginEntry.Init(basicRes) if err != nil { panic(fmt.Errorf("failed to initialize plugin %v due to %w", pluginName, err)) + } else { + basicRes.GetLogger().Info("init plugin: %s done", pluginName) } } else { basicRes.GetLogger().Info("plugin: %s doesn't implement 'PluginInit', it will be skipped.", pluginName) diff --git a/backend/helpers/pluginhelper/api/connection_helper.go b/backend/helpers/pluginhelper/api/connection_helper.go index 7be0395a3b4..677f350bc90 100644 --- a/backend/helpers/pluginhelper/api/connection_helper.go +++ b/backend/helpers/pluginhelper/api/connection_helper.go @@ -127,22 +127,22 @@ func (c *ConnectionApiHelper) FirstById(connection interface{}, id uint64) error // List returns all connections with password/token decrypted func (c *ConnectionApiHelper) List(connections interface{}) errors.Error { - c.log.Info("connections :%+v", connections) - fmt.Printf("connections :%+v\n", connections) - c.log.Info("connection api helper :%+v", c) - fmt.Printf("connection api helper :%+v\n", c) if c == nil { c.log.Info("connection api helper is nil") - fmt.Printf("connection api helper is nil") + fmt.Printf("connection api helper is nil\n") } else { - c.log.Info("connection api helper is not nil") - fmt.Printf("connection api helper is not nil") + c.log.Info("%s, connections :%+v", c.pluginName, connections) + fmt.Printf("%s connections :%+v\n", c.pluginName, connections) + c.log.Info("%s connection api helper :%+v", c.pluginName, c) + fmt.Printf("%s connection api helper :%+v\n", c.pluginName, c) + c.log.Info("%s connection api helper is not nil", c.pluginName) + fmt.Printf("%s connection api helper is not nil\n", c.pluginName) if c.db == nil { - c.log.Info("connection api helper db is nil") - fmt.Println("connection api helper db is nil") + c.log.Info("%s connection api helper db is nil", c.pluginName) + fmt.Printf("%s connection api helper db is nil\n", c.pluginName) } else { - c.log.Info("connection api helper db is not nil") - fmt.Println("connection api helper db is not nil") + c.log.Info("%s connection api helper db is not nil", c.pluginName) + fmt.Printf("%s connection api helper db is not nil", c.pluginName) } } diff --git a/backend/plugins/jira/api/connection_api.go b/backend/plugins/jira/api/connection_api.go index 9b6071b15fc..760a46b37f6 100644 --- a/backend/plugins/jira/api/connection_api.go +++ b/backend/plugins/jira/api/connection_api.go @@ -206,6 +206,10 @@ func DeleteConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput // @Failure 500 {string} errcode.Error "Internal Error" // @Router /plugins/jira/connections [GET] func ListConnections(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { + basicRes.GetLogger().Info("ds helper %+v", dsHelper) + if dsHelper != nil { + basicRes.GetLogger().Info("ds helper dsHelper %+v", dsHelper.ConnApi) + } return dsHelper.ConnApi.GetAll(input) } diff --git a/backend/plugins/jira/api/init.go b/backend/plugins/jira/api/init.go index 86ca5caa4d9..34a26228e75 100644 --- a/backend/plugins/jira/api/init.go +++ b/backend/plugins/jira/api/init.go @@ -50,6 +50,7 @@ func Init(br context.BasicRes, p plugin.PluginMeta) { nil, nil, ) + basicRes.GetLogger().Info("init dshelper: %+v", dsHelper) raProxy = api.NewDsRemoteApiProxyHelper[models.JiraConnection](dsHelper.ConnApi.ModelApiHelper) raScopeList = api.NewDsRemoteApiScopeListHelper[models.JiraConnection, models.JiraBoard, JiraRemotePagination](raProxy, listJiraRemoteScopes) raScopeSearch = api.NewDsRemoteApiScopeSearchHelper[models.JiraConnection, models.JiraBoard](raProxy, searchJiraRemoteBoards) diff --git a/backend/plugins/jira/impl/impl.go b/backend/plugins/jira/impl/impl.go index 259361475b7..542a2e05b2c 100644 --- a/backend/plugins/jira/impl/impl.go +++ b/backend/plugins/jira/impl/impl.go @@ -62,7 +62,7 @@ func (p Jira) ScopeConfig() dal.Tabler { func (p Jira) Init(basicRes context.BasicRes) errors.Error { api.Init(basicRes, p) - + fmt.Println("init jira with basic res and p", basicRes, p) return nil }