1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-17 14:11:02 +02:00

discard log output when not in debug mode

This commit is contained in:
Jesse Duffield 2018-08-13 23:35:01 +10:00
parent fb0004481b
commit 59e5545f38

View File

@ -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)