Skip to content

Commit

Permalink
Fix mistake made earlier when adapting the log file logic (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
zMoooooritz authored Dec 23, 2023
1 parent a7a0b88 commit d678339
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ import (

func Run(configFile string, logFile string) {
configuration := config.Load(configFile)
err := util.SetLogFile(logFile)
if err != nil {
log.Fatalln("Error occoured while setting up logger: ", err)

if logFile != "" {
err := util.SetLogFile(logFile)
if err != nil {
log.Fatalln("Error occoured while setting up logger: ", err)
}
util.Logger.Println("Application started.")
}
util.Logger.Println("Application started.")

p := tea.NewProgram(tui.InitialModel(configuration),
tea.WithAltScreen(),
Expand Down

0 comments on commit d678339

Please sign in to comment.