fix: use logfile path from config

This commit is contained in:
Rob Watson 2025-02-11 18:38:50 +01:00
parent 79d8df8923
commit c7bb2e75c0

View File

@ -37,7 +37,7 @@ func run(ctx context.Context, cfgReader io.Reader) error {
state := new(domain.AppState) state := new(domain.AppState)
applyConfig(cfg, state) applyConfig(cfg, state)
logFile, err := os.OpenFile("termstream.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) logFile, err := os.OpenFile(cfg.LogFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil { if err != nil {
return fmt.Errorf("error opening log file: %w", err) return fmt.Errorf("error opening log file: %w", err)
} }