Skip to content

Commit

Permalink
Merge pull request #2414 from actiontech/issue-2253
Browse files Browse the repository at this point in the history
解决sqle日志膨胀问题
  • Loading branch information
sjjian committed May 16, 2024
2 parents df16bc7 + 622576b commit f7887f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sqle/driver/plugin_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

"github.com/actiontech/sqle/sqle/config"
"github.com/hashicorp/go-hclog"

"github.com/actiontech/sqle/sqle/driver/common"
driverV1 "github.com/actiontech/sqle/sqle/driver/v1"
Expand Down Expand Up @@ -121,6 +122,11 @@ func (pm *pluginManager) register(pp PluginProcessor) error {

func getClientConfig(cmdBase string, cmdArgs []string) *goPlugin.ClientConfig {
return &goPlugin.ClientConfig{
Logger: hclog.New(&hclog.LoggerOptions{
Name: "plugin-client",
Output: log.Logger().Out,
Level: hclog.Trace,
}),
HandshakeConfig: driverV2.HandshakeConfig,
VersionedPlugins: map[int]goPlugin.PluginSet{
driverV1.ProtocolVersion: driverV1.PluginSet,
Expand Down Expand Up @@ -178,7 +184,7 @@ func (pm *pluginManager) Start(pluginDir string, pluginConfigList []config.Plugi
client := goPlugin.NewClient(getClientConfig(cmdBase, cmdArgs))
_, err := client.Client()
if err != nil {
return err
return fmt.Errorf("plugin %v failed to start, error: %v Please check the sqled.log for more details", p.Name(), err)
}

var pp PluginProcessor
Expand Down

0 comments on commit f7887f2

Please sign in to comment.