move dumpContainer method into debug

This commit is contained in:
Bradley Cicenas 2017-03-06 07:36:13 +00:00
parent 132335c8a4
commit e1dc42db03
2 changed files with 8 additions and 8 deletions

View File

@ -18,6 +18,14 @@ func logEvent(e ui.Event) {
log.Debugf("new event: %s", s)
}
// log container, metrics, and widget state
func dumpContainer(c *Container) {
msg := fmt.Sprintf("logging state for container: %s\n", c.Id)
msg += fmt.Sprintf("Id = %s\nname = %s\nstate = %s\n", c.Id, c.Name, c.State)
msg += inspect(&c.Metrics)
log.Infof(msg)
}
func inspect(i interface{}) (s string) {
val := reflect.ValueOf(i)
elem := val.Type().Elem()

View File

@ -48,14 +48,6 @@ func RedrawRows() {
ui.Render(cGrid)
}
// Log current container and widget state
func dumpContainer(c *Container) {
msg := fmt.Sprintf("logging state for container: %s\n", c.Id)
msg += fmt.Sprintf("Id = %s\nname = %s\nstate = %s\n", c.Id, c.Name, c.State)
msg += inspect(&c.Metrics)
log.Infof(msg)
}
//func (g *Grid) ExpandView() {
//ui.Clear()
//ui.DefaultEvtStream.ResetHandlers()