From 3ef716e6dc30b5819b0715f6f09d36238536d7b2 Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Tue, 23 Jan 2024 11:33:05 +0200 Subject: [PATCH] only log warnings and higher for providers (#3097) Signed-off-by: Ivan Milchev --- providers/coordinator.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/providers/coordinator.go b/providers/coordinator.go index 47adb33bd5..72847fd1df 100644 --- a/providers/coordinator.go +++ b/providers/coordinator.go @@ -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" @@ -208,6 +209,8 @@ 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, @@ -215,7 +218,7 @@ func (c *coordinator) Start(id string, isEphemeral bool, update UpdateProvidersC AllowedProtocols: []plugin.Protocol{ plugin.ProtocolNetRPC, plugin.ProtocolGRPC, }, - Logger: &hclogger{Logger: log.Logger}, + Logger: pluginLogger, Stderr: os.Stderr, })