1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-19 21:28:28 +02:00

output to development.log in append mode

This commit is contained in:
Jesse Duffield 2018-08-14 18:02:27 +10:00
parent 1c750fdb40
commit b32173b0c7

View File

@ -28,11 +28,11 @@ func newLogger(config config.AppConfigurer) *logrus.Logger {
log.Out = ioutil.Discard
return log
}
file, err := os.OpenFile("development.log", os.O_CREATE|os.O_WRONLY, 0666)
file, err := os.OpenFile("development.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err != nil {
panic("unable to log to file") // TODO: don't panic (also, remove this call to the `panic` function)
}
log.Out = file
log.SetOutput(file)
return log
}