Commit ed51ce3a by Marcus Efraimsson Committed by GitHub

Backend Plugins: Discard logged messages from logger named stdio (#23601)

Discard logged messages coming from backend plugin logger named 
stdio since that service is not in use. 

Fixes #23461
parent 7fc9921b
......@@ -60,7 +60,16 @@ func (lw logWrapper) With(args ...interface{}) hclog.Logger {
return logWrapper{Logger: lw.Logger.New(args...)}
}
func (lw logWrapper) Named(name string) hclog.Logger {
return logWrapper{Logger: lw.Logger.New()}
if name == "stdio" {
// discard logs from stdio hashicorp/go-plugin gRPC service since
// it's not enabled/in use per default.
// discard debug log of "waiting for stdio data".
// discard warn log of "received EOF, stopping recv loop".
return hclog.NewNullLogger()
}
return logWrapper{
Logger: lw.Logger.New(),
}
}
func (lw logWrapper) ResetNamed(name string) hclog.Logger {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment