Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 1d61de0

Browse files
Merge pull request #728 from github-for-unity/fixes/474-log-path-on-mac
The log on mac should be in ~/Library/Logs.
2 parents d74a8d6 + a86de23 commit 1d61de0

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Have you read GitHub for Unity's Code of Conduct? By filing an Issue, you are ex
99
- Be sure to run with tracing enabled to capture runtime details in the log file
1010
- Include the log file in the PR.
1111
- On Windows, the extension log file is at `%LOCALAPPDATA%\GitHubUnity\github-unity.log`
12-
- On macOS, the extension log file is at `~/Library/Application Support/GitHubUnity/github-unity.log`
12+
- On macOS, the extension log file is at `~/Library/Logs/GitHubUnity/github-unity.log`
1313

1414
### Description
1515

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Alternatively, import the package by clicking Assets, Import Package, Custom Pac
9292

9393
##### macOS
9494

95-
he extension log file can be found at `~/Library/Application Support/GitHubUnity/github-unity.log`
95+
The extension log file can be found at `~/Library/Logs/GitHubUnity/github-unity.log`
9696

9797
##### Windows
9898

src/GitHub.Api/Platform/DefaultEnvironment.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ public DefaultEnvironment()
4040

4141
UserCachePath = localAppData.Combine(ApplicationInfo.ApplicationName);
4242
SystemCachePath = commonAppData.Combine(ApplicationInfo.ApplicationName);
43-
LogPath = UserCachePath.Combine(logFile);
43+
if (IsMac)
44+
{
45+
LogPath = NPath.HomeDirectory.Combine("Library/Logs").Combine(ApplicationInfo.ApplicationName).Combine(logFile);
46+
}
47+
else
48+
{
49+
LogPath = UserCachePath.Combine(logFile);
50+
}
4451
}
4552

4653
public DefaultEnvironment(ICacheContainer cacheContainer) : this()

0 commit comments

Comments
 (0)