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:
parent
fb0004481b
commit
59e5545f38
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user