Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/Proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNewbyte <newbie13xd@gmail.com>2020-10-18 14:08:35 +0300
committerAndrew Eikum <aeikum@codeweavers.com>2020-11-09 22:43:05 +0300
commit6305de83bcfb37f965cd52ba109a143694b85907 (patch)
tree79c6d6da92be1fc44ae0e1fd90958e18100ec0d7
parent370dc01d07eba692e6d19ceebc7b9e0da07ad0c2 (diff)
proton: Make log directory configurable via PROTON_LOG_DIR
-rw-r--r--README.md3
-rwxr-xr-xproton4
-rwxr-xr-xuser_settings.sample.py3
3 files changed, 7 insertions, 3 deletions
diff --git a/README.md b/README.md
index 0a2d57b5..7ba6b3d0 100644
--- a/README.md
+++ b/README.md
@@ -264,7 +264,8 @@ the Wine prefix. Removing the option will revert to the previous behavior.
| Compat config string | Environment Variable | Description |
| :-------------------- | :----------------------------- | :----------- |
-| | <tt>PROTON_LOG</tt> | Convenience method for dumping a useful debug log to `$HOME/steam-$APPID.log`. For more thorough logging, use `user_settings.py`. |
+| | <tt>PROTON_LOG</tt> | Convenience method for dumping a useful debug log to `$PROTON_LOG_DIR/steam-$APPID.log` For more thorough logging, use `user_settings.py`. |
+| | <tt>PROTON_LOG_DIR</tt> | Output log files into the directory specified. Defaults to your home directory. |
| | <tt>PROTON_DUMP_DEBUG_COMMANDS</tt> | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. |
| | <tt>PROTON_DEBUG_DIR</tt> | Root directory for the Proton debug scripts, `/tmp` by default. |
| <tt>wined3d</tt> | <tt>PROTON_USE_WINED3D</tt> | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11, d3d10, and d3d9. |
diff --git a/proton b/proton
index ba6cb966..13dae363 100755
--- a/proton
+++ b/proton
@@ -703,7 +703,9 @@ class Session:
if "SteamGameId" in self.env:
if self.env["WINEDEBUG"] != "-all":
- lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log"
+ basedir = self.env.get("PROTON_LOG_DIR", os.environ["HOME"])
+ makedirs(basedir)
+ lfile_path = basedir + "/steam-" + os.environ["SteamGameId"] + ".log"
if os.path.exists(lfile_path):
os.remove(lfile_path)
self.log_file = open(lfile_path, "w+")
diff --git a/user_settings.sample.py b/user_settings.sample.py
index 874c3fe5..fdb9c30c 100755
--- a/user_settings.sample.py
+++ b/user_settings.sample.py
@@ -3,7 +3,8 @@
#Settings here will take effect for all games run in this Proton version.
user_settings = {
- #Logs are saved to $HOME/steam-<STEAM_GAME_ID>.log, overwriting any previous log with that name.
+ #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.
#Wine debug logging
"WINEDEBUG": "+timestamp,+pid,+tid,+seh,+debugstr,+loaddll,+mscoree",