You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ly...@apache.org on 2024/03/15 09:13:24 UTC
(incubator-devlake) 01/01: fix(helper): remove debug logs
This is an automated email from the ASF dual-hosted git repository.
lynwee pushed a commit to branch lw-0314
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 099d6ee1cf447b9cdcaa95831d1d67bd78856ec4
Author: houlinwei <ti...@gmail.com>
AuthorDate: Fri Mar 15 17:13:13 2024 +0800
fix(helper): remove debug logs
---
backend/core/plugin/hub.go | 2 +-
.../helpers/pluginhelper/api/connection_helper.go | 26 ----------------------
backend/plugins/jira/api/init.go | 1 -
3 files changed, 1 insertion(+), 28 deletions(-)
diff --git a/backend/core/plugin/hub.go b/backend/core/plugin/hub.go
index a7f9c9f2c..82443b87d 100644
--- a/backend/core/plugin/hub.go
+++ b/backend/core/plugin/hub.go
@@ -80,7 +80,7 @@ func InitPlugins(basicRes context.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)
+ basicRes.GetLogger().Info("init plugin: %s successfully", 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 677f350bc..d299afeed 100644
--- a/backend/helpers/pluginhelper/api/connection_helper.go
+++ b/backend/helpers/pluginhelper/api/connection_helper.go
@@ -61,13 +61,6 @@ func NewConnectionHelper(
bpManager: services.NewBlueprintManager(basicRes.GetDal()),
pluginName: pluginName,
}
- if h.db == nil {
- h.log.Info("connection api helper db is nil")
- fmt.Println("connection api helper db is nil")
- } else {
- h.log.Info("connection api helper db is not nil")
- fmt.Println("connection api helper db is not nil")
- }
return h
}
@@ -127,25 +120,6 @@ 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 {
- if c == nil {
- c.log.Info("connection api helper is nil")
- fmt.Printf("connection api helper is nil\n")
- } else {
- 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("%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("%s connection api helper db is not nil", c.pluginName)
- fmt.Printf("%s connection api helper db is not nil", c.pluginName)
- }
- }
-
return CallDB(c.db.All, connections)
}
diff --git a/backend/plugins/jira/api/init.go b/backend/plugins/jira/api/init.go
index 34a26228e..86ca5caa4 100644
--- a/backend/plugins/jira/api/init.go
+++ b/backend/plugins/jira/api/init.go
@@ -50,7 +50,6 @@ 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)