From e1dc42db0397495aa5521a15dbda623f8204ebd9 Mon Sep 17 00:00:00 2001 From: Bradley Cicenas Date: Mon, 6 Mar 2017 07:36:13 +0000 Subject: [PATCH] move dumpContainer method into debug --- debug.go | 8 ++++++++ grid.go | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) 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()