mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove blank line on daemon output when there are no containers to load
Its a minor thing but the daemon's output looks like this when there are no containers to load: ``` INFO[0001] Loading containers: start. INFO[0001] Loading containers: done. ``` That blank line (or more correctly, the \n) is unnecessary when there are no containers to load since there is no `.` printed Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
parent
d4bff5e3aa
commit
478dd721ab
1 changed files with 3 additions and 1 deletions
|
@ -117,11 +117,13 @@ func (daemon *Daemon) restore() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
containerCount := 0
|
||||||
for _, v := range dir {
|
for _, v := range dir {
|
||||||
id := v.Name()
|
id := v.Name()
|
||||||
container, err := daemon.load(id)
|
container, err := daemon.load(id)
|
||||||
if !debug && logrus.GetLevel() == logrus.InfoLevel {
|
if !debug && logrus.GetLevel() == logrus.InfoLevel {
|
||||||
fmt.Print(".")
|
fmt.Print(".")
|
||||||
|
containerCount++
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Errorf("Failed to load container %v: %v", id, err)
|
logrus.Errorf("Failed to load container %v: %v", id, err)
|
||||||
|
@ -306,7 +308,7 @@ func (daemon *Daemon) restore() error {
|
||||||
group.Wait()
|
group.Wait()
|
||||||
|
|
||||||
if !debug {
|
if !debug {
|
||||||
if logrus.GetLevel() == logrus.InfoLevel {
|
if logrus.GetLevel() == logrus.InfoLevel && containerCount > 0 {
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
logrus.Info("Loading containers: done.")
|
logrus.Info("Loading containers: done.")
|
||||||
|
|
Loading…
Reference in a new issue