Skip to content

Commit 42a97f1

Browse files
authored
Use logrus for tui logging (#77)
1 parent c4d3690 commit 42a97f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/app/master/tui/tui.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package tui
33
import (
44
"os"
55

6-
"log"
6+
log "github.com/sirupsen/logrus"
77

88
tea "github.com/charmbracelet/bubbletea"
99
"github.com/mintoolkit/mint/pkg/app/master/tui/common"
@@ -17,6 +17,9 @@ func RunTUI(model tea.Model, standalone bool) {
1717
os.Exit(1)
1818
}
1919
defer f.Close()
20+
21+
log.SetOutput(f)
22+
log.SetLevel(log.DebugLevel) // TODO - should derive log level from `FlagLogLevel`
2023
// We are running the tui via `mint tui`
2124
if !standalone {
2225
common.TUIsInstance.Home = model

0 commit comments

Comments
 (0)