Skip to content

Commit

Permalink
fix: only log on fatal when not debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvhdr committed Sep 25, 2024
1 parent c9be0d7 commit babe77f
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 babe77f

Please sign in to comment.