Skip to content

Commit

Permalink
only log warnings and higher for providers (#3097)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Jan 23, 2024
1 parent 4f720e8 commit 3ef716e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion providers/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-plugin"
"github.com/muesli/termenv"
"github.com/rs/zerolog"
Expand Down Expand Up @@ -208,14 +209,16 @@ func (c *coordinator) Start(id string, isEphemeral bool, update UpdateProvidersC

addColorConfig(pluginCmd)

pluginLogger := &hclogger{Logger: log.Logger}
pluginLogger.SetLevel(hclog.Warn)
client := plugin.NewClient(&plugin.ClientConfig{
HandshakeConfig: pp.Handshake,
Plugins: pp.PluginMap,
Cmd: pluginCmd,
AllowedProtocols: []plugin.Protocol{
plugin.ProtocolNetRPC, plugin.ProtocolGRPC,
},
Logger: &hclogger{Logger: log.Logger},
Logger: pluginLogger,
Stderr: os.Stderr,
})

Expand Down

0 comments on commit 3ef716e

Please sign in to comment.