Skip to content

Commit e413dae

Browse files
authored
Merge pull request #4392 from thaJeztah/debug_relax
docker info: fix condition for printing debug information
2 parents cb1def7 + 92d7a23 commit e413dae

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cli/command/system/info.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,12 @@ func prettyPrintServerInfo(streams command.Streams, info *info) []error {
313313
fprintln(output, " Docker Root Dir:", info.DockerRootDir)
314314
fprintln(output, " Debug Mode:", info.Debug)
315315

316-
if info.Debug {
316+
// The daemon collects this information regardless if "debug" is
317+
// enabled. Print the debugging information if either the daemon,
318+
// or the client has debug enabled. We should probably improve this
319+
// logic and print any of these if set (but some special rules are
320+
// needed for file-descriptors, which may use "-1".
321+
if info.Debug || debug.IsEnabled() {
317322
fprintln(output, " File Descriptors:", info.NFd)
318323
fprintln(output, " Goroutines:", info.NGoroutines)
319324
fprintln(output, " System Time:", info.SystemTime)

0 commit comments

Comments
 (0)