From 11c4a14c75a32b0c032f72470d597432db8b9a60 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Thu, 6 Jun 2019 13:18:44 -0500 Subject: [PATCH] proton: Add PROTON_LOG_ALL_PROCESSES for logging all processes --- README.md | 1 + proton | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7126676d..073fb249 100644 --- a/README.md +++ b/README.md @@ -254,6 +254,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 `$HOME/steam-$APPID.log`. For more thorough logging, use `user_settings.py`. | +| | PROTON_LOG_ALL_PROCESSES | Instead of clearing the log for each invocation and only logging the game process, append logging for all process to `$HOME/steam-proton.log` without ever clearing the log. Use with care so you don't run out of hard disk space. | | | 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. | | wined3d | PROTON_USE_WINED3D | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11 and d3d10. This used to be called `PROTON_USE_WINED3D11`, which is now an alias for this same option. | diff --git a/proton b/proton index 935c32e0..94a666ab 100755 --- a/proton +++ b/proton @@ -285,17 +285,21 @@ if "forcelgadd" in config_opts: env["WINE_LARGE_ADDRESS_AWARE"] = "1" lfile = None -if "SteamGameId" in env: +if "SteamGameId" in env or "PROTON_LOG_ALL_PROCESSES" in env: if env["WINEDEBUG"] != "-all": - lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log" - if os.path.exists(lfile_path): - os.remove(lfile_path) + if "PROTON_LOG_ALL_PROCESSES" in env: + lfile_path = os.environ["HOME"] + "/steam-proton.log" + else: + lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log" + if os.path.exists(lfile_path): + os.remove(lfile_path) lfile = open(lfile_path, "w+") lfile.write("======================\n") with open(basedir + "/version", "r") as f: lfile.write("Proton: " + f.readline().strip() + "\n") - lfile.write("SteamGameId: " + env["SteamGameId"] + "\n") - lfile.write("Command: " + str(sys.argv[2:]) + "\n") + if "SteamGameId" in env: + lfile.write("SteamGameId: " + env["SteamGameId"] + "\n") + lfile.write("Command: " + str(sys.argv[1:]) + "\n") lfile.write("======================\n") lfile.flush() else: