Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use logrus for tui logging #77

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/app/master/tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -17,6 +17,9 @@ func RunTUI(model tea.Model, standalone bool) {
os.Exit(1)
}
defer f.Close()

log.SetOutput(f)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably don't need to configure logging. should be ok to just start using it. the global parameter handling logic should configure it already, but it's good to double check :)

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
Expand Down
Loading