diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-13 23:35:01 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-13 23:35:01 +1000 |
commit | 59e5545f38e161332acd481f7f8084ff2c57b33e (patch) | |
tree | 47843f88b902478f308debee79424dc42ff7de4f /pkg/app | |
parent | fb0004481b445b30b8180ddb27fb61e3c541337a (diff) |
discard log output when not in debug mode
Diffstat (limited to 'pkg/app')
-rw-r--r-- | pkg/app/app.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go index 011375737..d5a8f11c9 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -2,6 +2,7 @@ package app import ( "io" + "io/ioutil" "os" "github.com/Sirupsen/logrus" @@ -24,7 +25,7 @@ type App struct { func newLogger(config config.AppConfigurer) *logrus.Logger { log := logrus.New() if !config.GetDebug() { - log.Out = nil + log.Out = ioutil.Discard return log } file, err := os.OpenFile("development.log", os.O_CREATE|os.O_WRONLY, 0666) |