Skip to content

Commit

Permalink
Merge pull request docker#4392 from thaJeztah/debug_relax
Browse files Browse the repository at this point in the history
docker info: fix condition for printing debug information
  • Loading branch information
thaJeztah authored Jun 30, 2023
2 parents cb1def7 + 92d7a23 commit e413dae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cli/command/system/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,12 @@ func prettyPrintServerInfo(streams command.Streams, info *info) []error {
fprintln(output, " Docker Root Dir:", info.DockerRootDir)
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, " Goroutines:", info.NGoroutines)
fprintln(output, " System Time:", info.SystemTime)
Expand Down

0 comments on commit e413dae

Please sign in to comment.