Skip to content

Commit

Permalink
Config: Fix SetNTPCheck using log
Browse files Browse the repository at this point in the history
Called from engine before logger is inited, and also just wrong to use
log to communicate with user
  • Loading branch information
gbjk committed Nov 10, 2024
1 parent c728241 commit 73b3ee5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1290,8 +1290,8 @@ func (c *Config) SetNTPCheck(input io.Reader) (string, error) {
defer m.Unlock()

reader := bufio.NewReader(input)
log.Warnln(log.ConfigMgr, "Your system time is out of sync, this may cause issues with trading")
log.Warnln(log.ConfigMgr, "How would you like to show future notifications? (a)lert at startup / (w)arn periodically / (d)isable")
fmt.Println("Your system time is out of sync, this may cause issues with trading")
fmt.Println("How would you like to show future notifications? (a)lert at startup / (w)arn periodically / (d)isable")

var resp string
answered := false
Expand All @@ -1316,8 +1316,7 @@ func (c *Config) SetNTPCheck(input io.Reader) (string, error) {
resp = "Future notifications for out of time sync has been disabled"
answered = true
default:
log.Warnln(log.ConfigMgr,
"Invalid option selected, please try again (a)lert / (w)arn / (d)isable")
fmt.Println("Invalid option selected, please try again (a)lert / (w)arn / (d)isable")
}
}
return resp, nil
Expand Down

0 comments on commit 73b3ee5

Please sign in to comment.