From 803f88c38374b56f73afc0b67be5c3c29892b7d5 Mon Sep 17 00:00:00 2001 From: Evan Harris Date: Mon, 28 Oct 2024 13:58:07 -0400 Subject: [PATCH] Use logrus for tui logging --- pkg/app/master/tui/tui.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/app/master/tui/tui.go b/pkg/app/master/tui/tui.go index ab53a915..005999b0 100644 --- a/pkg/app/master/tui/tui.go +++ b/pkg/app/master/tui/tui.go @@ -3,7 +3,7 @@ package tui import ( "os" - "log" + log "github.com/sirupsen/logrus" tea "github.com/charmbracelet/bubbletea" "github.com/mintoolkit/mint/pkg/app/master/tui/common" @@ -17,6 +17,9 @@ func RunTUI(model tea.Model, standalone bool) { os.Exit(1) } defer f.Close() + + log.SetOutput(f) + log.SetLevel(log.DebugLevel) // TODO - should derive log level from `FlagLogLevel` // We are running the tui via `mint tui` if !standalone { common.TUIsInstance.Home = model