diff --git a/debug.go b/debug.go index 972ce6a..9faf3dc 100644 --- a/debug.go +++ b/debug.go @@ -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() diff --git a/grid.go b/grid.go index 215579d..7d61dab 100644 --- a/grid.go +++ b/grid.go @@ -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()