proton: Make log creation depend only on PROTON_LOG.

There are valid cases, e.g. when debugging Wine Mono, to have WINEDEBUG
set to -all. Before this change this would disable the logging even if
PROTON_LOG=1.
This commit is contained in:
Arkadiusz Hiler 2023-03-01 19:13:55 +02:00
parent 89e4e160ac
commit 7bd855e054
2 changed files with 4 additions and 1 deletions

2
proton
View file

@ -1391,7 +1391,7 @@ class Session:
if "PROTON_CRASH_REPORT_DIR" in self.env:
self.env["WINE_CRASH_REPORT_DIR"] = self.env["PROTON_CRASH_REPORT_DIR"]
if self.env["WINEDEBUG"] != "-all":
if "PROTON_LOG" in self.env and nonzero(self.env["PROTON_LOG"]):
if self.setup_logging(append_forever=False):
self.log_file.write("======================\n")
with open(g_proton.version_file, "r") as f:

View file

@ -6,6 +6,9 @@ user_settings = {
#By default, logs are saved to $HOME/steam-<STEAM_GAME_ID>.log, overwriting any previous log with that name.
#Log directory can be overridden with $PROTON_LOG_DIR.
#enable logging
"PROTON_LOG": "1",
#Wine debug logging
"WINEDEBUG": "+timestamp,+pid,+seh,+unwind,+debugstr,+loaddll,+mscoree",