From 7bd855e054240f2a5c6a6721b909f5a49a2a22ed Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Wed, 1 Mar 2023 19:13:55 +0200 Subject: [PATCH] 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. --- proton | 2 +- user_settings.sample.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/proton b/proton index e6747e44..e7de588f 100755 --- a/proton +++ b/proton @@ -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: diff --git a/user_settings.sample.py b/user_settings.sample.py index 7e04d867..093a851b 100755 --- a/user_settings.sample.py +++ b/user_settings.sample.py @@ -6,6 +6,9 @@ user_settings = { #By default, logs are saved to $HOME/steam-.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",