Closed navi-desu closed 1 year ago
Something has changed since I first started building Ryujinx. I can only reproduce this error if I set "enable_file_log": true,"
in ~/.config/Ryujinx/Config.json
. Setting the checkmark in Ryujinx and clicking Save or Apply has no effect.
Does it work if you "enable_file_log": false,
in ~/.config/Ryujinx/Config.json
? If this file does not exist you can write { "enable_file_log": false }
.
Yeah, disabling the enable_log_file works. Ideally tho it should save the logs to $XDG_STATE_HOME (default .local/state/), I wonder if there is a compile time setting for setting log dir, or if not we could raise this issue to upstream...
There probably is not but it can be patched in. I haven't really looked into it but I am sure it's an easy patch. They should disable logging by default for performance reasons (like they used to AFAIK).
Here's where the log path is determined.
https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Ui.Common/Configuration/LoggerModule.cs#L83
This probably does not need to be patched unless we really want to use the state directory: https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Common/Logging/Targets/FileLogTarget.cs#L22
Finally I think setting this to false will make logs disabled by default in case there is no config yet: https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs#L614
I made a patch to make logging disabled by default, so out of box Ryujinx should work fine. If you enable logging the issue will occur again. I was trying to patch ConfigurationState to have a better path but it was not working. I will try more things later.
Is this issue resolved? If so, could you close this?
Error be: 00:00:00.099 |E| Application : Unhandled exception caught: System.UnauthorizedAccessException: Access to the path '/usr/bin/Logs' is denied.
Creating a folder Logs (or running as root to let it do so) make it work, but having a Logs folder with 777 on /usr/bin is not really that optimal.