mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
clean up fixup code
reduce log clutter add log dumping with spew
This commit is contained in:
10
main.go
10
main.go
@ -11,6 +11,8 @@ import (
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
|
||||
"github.com/jesseduffield/gocui"
|
||||
git "gopkg.in/src-d/go-git.v4"
|
||||
)
|
||||
@ -47,6 +49,14 @@ func devLog(objects ...interface{}) {
|
||||
localLog("development.log", objects...)
|
||||
}
|
||||
|
||||
func objectLog(object interface{}) {
|
||||
if !*debuggingFlag {
|
||||
return
|
||||
}
|
||||
str := spew.Sdump(object)
|
||||
localLog("development.log", str)
|
||||
}
|
||||
|
||||
func commandLog(objects ...interface{}) {
|
||||
localLog("commands.log", objects...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user