mirror of https://github.com/docker/cli.git
Merge pull request #4393 from thaJeztah/24.0_backport_debug_relax
[24.0 backport] docker info: fix condition for printing debug information
This commit is contained in:
commit
fad718c7ea
|
@ -313,7 +313,12 @@ func prettyPrintServerInfo(streams command.Streams, info *info) []error {
|
||||||
fprintln(output, " Docker Root Dir:", info.DockerRootDir)
|
fprintln(output, " Docker Root Dir:", info.DockerRootDir)
|
||||||
fprintln(output, " Debug Mode:", info.Debug)
|
fprintln(output, " Debug Mode:", info.Debug)
|
||||||
|
|
||||||
if info.Debug {
|
// The daemon collects this information regardless if "debug" is
|
||||||
|
// enabled. Print the debugging information if either the daemon,
|
||||||
|
// or the client has debug enabled. We should probably improve this
|
||||||
|
// logic and print any of these if set (but some special rules are
|
||||||
|
// needed for file-descriptors, which may use "-1".
|
||||||
|
if info.Debug || debug.IsEnabled() {
|
||||||
fprintln(output, " File Descriptors:", info.NFd)
|
fprintln(output, " File Descriptors:", info.NFd)
|
||||||
fprintln(output, " Goroutines:", info.NGoroutines)
|
fprintln(output, " Goroutines:", info.NGoroutines)
|
||||||
fprintln(output, " System Time:", info.SystemTime)
|
fprintln(output, " System Time:", info.SystemTime)
|
||||||
|
|
Loading…
Reference in New Issue