From b32173b0c724102f7817f313d07dd257e4299909 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 14 Aug 2018 18:02:27 +1000 Subject: [PATCH] output to development.log in append mode --- pkg/app/app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/app/app.go b/pkg/app/app.go index d5a8f11c9..d558ed250 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -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 }