Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 only log warnings and higher for providers #3097

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading