mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
clean up fixup code
reduce log clutter add log dumping with spew
This commit is contained in:
parent
f1eaeec9ee
commit
73e740d1ba
7 changed files with 91 additions and 48 deletions
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...)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue