From 094d1aded87d583d5d0ceac7b82955f1b445b8d1 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 19 Jul 2023 11:04:45 +0200 Subject: [PATCH] commands: NewRootCmd: remove obsolete logrus filter hook This hook was added in 278f94a8b62052ed790bb1c6832268eb79a6d03d and 72758fef22441c37f809cce098f73a21e618b9d1 to suppress spurious warnings printed by the CLI's cli/connhelper/commandconn package; https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/connhelper/commandconn/commandconn.go#L203-L214 Those logs were removed in https://github.com/docker/cli/commit/a5ebe2282aabaf983c116525af4a7c5eeedf2c6e so we can remove the hook. Signed-off-by: Sebastiaan van Stijn --- commands/root.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/commands/root.go b/commands/root.go index 4dd5fc8a..26ed68ce 100644 --- a/commands/root.go +++ b/commands/root.go @@ -52,17 +52,6 @@ func NewRootCmd(name string, isPlugin bool, dockerCli command.Cli) *cobra.Comman "using default config store", )) - // filter out useless commandConn.CloseWrite warning message that can occur - // when listing builder instances with "buildx ls" for those that are - // unreachable: "commandConn.CloseWrite: commandconn: failed to wait: signal: killed" - // https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/connhelper/commandconn/commandconn.go#L203-L214 - logrus.AddHook(logutil.NewFilter([]logrus.Level{ - logrus.WarnLevel, - }, - "commandConn.CloseWrite:", - "commandConn.CloseRead:", - )) - addCommands(cmd, dockerCli) return cmd }