mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #11978 from x1022as/info-show-loggingdriver
docker info show logging driver info
This commit is contained in:
commit
ed8d402851
6 changed files with 8 additions and 1 deletions
|
@ -57,6 +57,9 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
|||
if remoteInfo.Exists("ExecutionDriver") {
|
||||
fmt.Fprintf(cli.out, "Execution Driver: %s\n", remoteInfo.Get("ExecutionDriver"))
|
||||
}
|
||||
if remoteInfo.Exists("LoggingDriver") {
|
||||
fmt.Fprintf(cli.out, "Logging Driver: %s\n", remoteInfo.Get("LoggingDriver"))
|
||||
}
|
||||
if remoteInfo.Exists("KernelVersion") {
|
||||
fmt.Fprintf(cli.out, "Kernel Version: %s\n", remoteInfo.Get("KernelVersion"))
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ func (daemon *Daemon) CmdInfo(job *engine.Job) error {
|
|||
v.SetInt("NGoroutines", runtime.NumGoroutine())
|
||||
v.Set("SystemTime", time.Now().Format(time.RFC3339Nano))
|
||||
v.Set("ExecutionDriver", daemon.ExecutionDriver().Name())
|
||||
v.Set("LoggingDriver", daemon.defaultLogConfig.Type)
|
||||
v.SetInt("NEventsListener", env.GetInt("count"))
|
||||
v.Set("KernelVersion", kernelVersion)
|
||||
v.Set("OperatingSystem", operatingSystem)
|
||||
|
|
|
@ -37,6 +37,7 @@ Here is a sample output:
|
|||
Root Dir: /var/lib/docker/aufs
|
||||
Dirs: 80
|
||||
Execution Driver: native-0.2
|
||||
Logging Driver: json-file
|
||||
Kernel Version: 3.13.0-24-generic
|
||||
Operating System: Ubuntu 14.04 LTS
|
||||
CPUs: 1
|
||||
|
|
|
@ -1333,6 +1333,7 @@ For example:
|
|||
Backing Filesystem: extfs
|
||||
Dirs: 545
|
||||
Execution Driver: native-0.2
|
||||
Logging Driver: json-file
|
||||
Kernel Version: 3.13.0-24-generic
|
||||
Operating System: Ubuntu 14.04 LTS
|
||||
CPUs: 1
|
||||
|
|
|
@ -171,6 +171,7 @@ These labels appear as part of the `docker info` output for the daemon:
|
|||
Backing Filesystem: extfs
|
||||
Dirs: 697
|
||||
Execution Driver: native-0.2
|
||||
Logging Driver: json-file
|
||||
Kernel Version: 3.13.0-32-generic
|
||||
Operating System: Ubuntu 14.04.1 LTS
|
||||
CPUs: 1
|
||||
|
|
|
@ -14,7 +14,7 @@ func TestInfoEnsureSucceeds(t *testing.T) {
|
|||
t.Fatalf("failed to execute docker info: %s, %v", out, err)
|
||||
}
|
||||
|
||||
stringsToCheck := []string{"Containers:", "Execution Driver:", "Kernel Version:"}
|
||||
stringsToCheck := []string{"Containers:", "Execution Driver:", "Logging Driver:", "Kernel Version:"}
|
||||
|
||||
for _, linePrefix := range stringsToCheck {
|
||||
if !strings.Contains(out, linePrefix) {
|
||||
|
|
Loading…
Reference in a new issue