mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-03 18:07:41 +08:00
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;3fb4fb83df/cli/connhelper/commandconn/commandconn.go (L203-L214)
Those logs were removed ina5ebe2282a
so we can remove the hook. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 094d1aded87d583d5d0ceac7b82955f1b445b8d1) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
27f332f135
commit
35dac12ae5
@ -52,17 +52,6 @@ func NewRootCmd(name string, isPlugin bool, dockerCli command.Cli) *cobra.Comman
|
|||||||
"using default config store",
|
"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)
|
addCommands(cmd, dockerCli)
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user