From 32fe36d9b2b1cd8429e27ccceb33fb0cf8e9a226 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 21 Feb 2022 09:09:22 -0600 Subject: [PATCH] proton: Extend PROTON_LOG to support adding extra WINEDEBUG channels --- README.md | 2 +- proton | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f7138cbc..b5bc7b22 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ the Wine prefix. Removing the option will revert to the previous behavior. | Compat config string | Environment Variable | Description | | :-------------------- | :--------------------------------- | :----------- | -| | `PROTON_LOG` | Convenience method for dumping a useful debug log to `$PROTON_LOG_DIR/steam-$APPID.log` For more thorough logging, use `user_settings.py`. | +| | `PROTON_LOG` | Convenience method for dumping a useful debug log to `$PROTON_LOG_DIR/steam-$APPID.log`. Set to `1` to enable default logging, or set to a string to be appended to the default `WINEDEBUG` channels. | | | `PROTON_LOG_DIR` | Output log files into the directory specified. Defaults to your home directory. | | | `PROTON_DUMP_DEBUG_COMMANDS` | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. | | | `PROTON_DEBUG_DIR` | Root directory for the Proton debug scripts, `/tmp` by default. | diff --git a/proton b/proton index 69fc41af..af04b0e4 100755 --- a/proton +++ b/proton @@ -1066,6 +1066,9 @@ class Session: self.env.setdefault("VKD3D_DEBUG", "warn") self.env.setdefault("WINE_MONO_TRACE", "E:System.NotImplementedException") + if self.env["PROTON_LOG"] != "1": + append_to_env_str(self.env, "WINEDEBUG", self.env["PROTON_LOG"], ",") + #for performance, logging is disabled by default; override with user_settings.py self.env.setdefault("WINEDEBUG", "-all") self.env.setdefault("DXVK_LOG_LEVEL", "none")