Skip to content

Commit

Permalink
fix: only log on fatal when not debug mode (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvhdr authored Sep 25, 2024
1 parent 141f0f8 commit 93bd7bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ func createModel(repoPath *string, configPath string, debug bool) (ui.Model, *os
loggerFile, _ = tea.LogToFile("debug.log", "debug")
slog.Print("Failed setting up logging", fileErr)
}
} else {
log.SetOutput(os.Stderr)
log.SetLevel(log.FatalLevel)
}

return ui.NewModel(repoPath, configPath), loggerFile
Expand Down

0 comments on commit 93bd7bc

Please sign in to comment.