diff --git a/config/switch.go b/config/switch.go index acbf8d4..80cad9f 100644 --- a/config/switch.go +++ b/config/switch.go @@ -19,7 +19,7 @@ var switches = []*Switch{ }, &Switch{ Key: "loggingEnabled", - Val: true, + Val: false, Label: "Enable Logging Server", }, } diff --git a/logging/main.go b/logging/main.go index 18161ed..cea31b0 100644 --- a/logging/main.go +++ b/logging/main.go @@ -13,7 +13,7 @@ const ( var ( Log *CTopLogger exited bool - level = logging.DEBUG + level = logging.INFO format = logging.MustStringFormatter( `%{color}%{time:15:04:05.000} ▶ %{level:.4s} %{id:03x}%{color:reset} %{message}`, ) diff --git a/main.go b/main.go index b9ffcd7..7dbffe6 100644 --- a/main.go +++ b/main.go @@ -22,21 +22,25 @@ func main() { defer func() { if r := recover(); r != nil { ui.Clear() - fmt.Printf("panic: %s", r) + fmt.Printf("panic: %s\n", r) os.Exit(1) } }() config.Init() + + // init logger log = logging.Init() if config.GetSwitchVal("loggingEnabled") { logging.StartServer() } - cursor = NewGridCursor() + + // init ui, grid if err := ui.Init(); err != nil { panic(err) } defer ui.Close() + cursor = NewGridCursor() for { exit := Display() diff --git a/menus.go b/menus.go index 64680b4..3d06865 100644 --- a/menus.go +++ b/menus.go @@ -8,6 +8,8 @@ import ( ) var helpDialog = []menu.Item{ + menu.Item{"[a] - toggle display of all containers", ""}, + menu.Item{"[f] - filter displayed containers", ""}, menu.Item{"[h] - open this help dialog", ""}, menu.Item{"[H] - toggle cTop header", ""}, menu.Item{"[s] - select container sort field", ""},