Standardize logging locations across desktop platforms (#6238)
* Standardize logging locations across desktop platforms * Return null instead of empty literal on exceptions * Remove LogDirectoryPath from LoggerModule * Catch exception when creating DirectoryInfo in FileLogTarget * Remove redundant log path vars, handle exception better, add null check * Address styling issues * Remove extra newline, quote file path in log, move directory check to OpenHelper * Add GetOrCreateLogsDir to get/create log directory during runtime * misc format changes * Update src/Ryujinx.Common/Configuration/AppDataManager.cs --------- Co-authored-by: jcm <butt@butts.com> Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
parent
95c4912d58
commit
84d6e8d121
6 changed files with 156 additions and 50 deletions
|
@ -1350,16 +1350,11 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
|
||||
public void OpenLogsFolder()
|
||||
{
|
||||
string logPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs");
|
||||
|
||||
if (LoggerModule.LogDirectoryPath != null)
|
||||
string logPath = AppDataManager.GetOrCreateLogsDir();
|
||||
if (!string.IsNullOrEmpty(logPath))
|
||||
{
|
||||
logPath = LoggerModule.LogDirectoryPath;
|
||||
OpenHelper.OpenFolder(logPath);
|
||||
}
|
||||
|
||||
new DirectoryInfo(logPath).Create();
|
||||
|
||||
OpenHelper.OpenFolder(logPath);
|
||||
}
|
||||
|
||||
public void ToggleDockMode()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue