diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-26 10:23:10 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-26 11:00:50 +1000 |
commit | 077f11361805417c15234c62a9f9aa022f913d43 (patch) | |
tree | 2cf25beba4f96b55392f09d733a14c25c149de07 /pkg/config/app_config.go | |
parent | 0c6cbe7746660155df0645f01d37150099d21f49 (diff) |
add in-built logging support for a better dev experience
Diffstat (limited to 'pkg/config/app_config.go')
-rw-r--r-- | pkg/config/app_config.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index c79907c64..5df706ea0 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -410,11 +410,12 @@ func getDefaultAppState() []byte { `) } -// // commenting this out until we use it again -// func homeDirectory() string { -// usr, err := user.Current() -// if err != nil { -// log.Fatal(err) -// } -// return usr.HomeDir -// } +func globalConfigDir() string { + configDirs := configdir.New("jesseduffield", "lazygit") + configDir := configDirs.QueryFolders(configdir.Global)[0] + return configDir.Path +} + +func LogPath() string { + return filepath.Join(globalConfigDir(), "development.log") +} |