Fix logfile

This commit is contained in:
r 2020-02-26 10:40:46 +00:00
parent a57a142328
commit c41f9272f9

View file

@ -90,7 +90,8 @@ func main() {
if len(config.LogFile) < 1 { if len(config.LogFile) < 1 {
logger = log.New(os.Stdout, "", log.LstdFlags) logger = log.New(os.Stdout, "", log.LstdFlags)
} else { } else {
lf, err := os.Open(config.LogFile) lf, err := os.OpenFile(config.LogFile,
os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
if err != nil { if err != nil {
errExit(err) errExit(err)
} }