fix: use logfile path from config
This commit is contained in:
parent
79d8df8923
commit
c7bb2e75c0
2
main.go
2
main.go
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user