Update log location for fleet desktop on macOS (#6420)

This commit is contained in:
Sharvil Shah 2022-06-29 07:54:32 -07:00 committed by GitHub
parent 9bfb43b2cf
commit 7091aa364b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -0,0 +1 @@
* Updated and corrected the macOS logger destination for Fleet Desktop to ~/Library/Logs

View file

@ -201,7 +201,7 @@ func setupLogs() {
// On Unix systems, it returns $XDG_STATE_HOME as specified by
// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if
// non-empty, else $HOME/.local/state.
// On Darwin, it returns $HOME/Library/Log.
// On Darwin, it returns $HOME/Library/Logs.
// On Windows, it returns %LocalAppData%
//
// If the location cannot be determined (for example, $HOME is not defined),
@ -221,7 +221,7 @@ func logDir() (string, error) {
if dir == "" {
return "", errors.New("$HOME is not defined")
}
dir += "/Library/Log"
dir += "/Library/Logs"
default: // Unix
dir = os.Getenv("XDG_STATE_HOME")