add status err messages to start/stop/remove

This commit is contained in:
Bradley Cicenas 2018-01-11 18:27:30 +00:00
parent d46ce783c2
commit 107def9ccc
2 changed files with 6 additions and 0 deletions

View File

@ -93,6 +93,7 @@ func (c *Container) Start() {
if c.Meta["state"] != "running" {
if err := c.manager.Start(); err != nil {
log.Warningf("container %s: %v", c.Id, err)
log.StatusErr(err)
return
}
c.SetState("running")
@ -103,6 +104,7 @@ func (c *Container) Stop() {
if c.Meta["state"] == "running" {
if err := c.manager.Stop(); err != nil {
log.Warningf("container %s: %v", c.Id, err)
log.StatusErr(err)
return
}
c.SetState("exited")
@ -112,5 +114,6 @@ func (c *Container) Stop() {
func (c *Container) Remove() {
if err := c.manager.Remove(); err != nil {
log.Warningf("container %s: %v", c.Id, err)
log.StatusErr(err)
}
}

View File

@ -145,6 +145,9 @@ func Display() bool {
})
ui.Handle("/timer/1s", func(e ui.Event) {
if log.StatusQueued() {
ui.StopLoop()
}
RefreshDisplay()
})