From d2d52bd68aa01f710335ac48480afa5b7499cfbb Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Mon, 24 May 2021 16:09:07 +0300 Subject: [PATCH] proton: Open the log file in append mode. Opening file in append mode sets the offset to the end of the file prior to each write. This allows user to append tags/notes to the log file just before interesting events, e.g.: local $ ssh ivyl@test test $ echo "!!! FOCUS CHANGE" >> ~/steam-XYZ.log The log file is deleted just before we open it anyway, so there won't be any leftover content from previous session. --- proton | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proton b/proton index 5246f7e8..e43722be 100755 --- a/proton +++ b/proton @@ -791,7 +791,7 @@ class Session: 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+") + self.log_file = open(lfile_path, "a") self.log_file.write("======================\n") with open(g_proton.version_file, "r") as f: self.log_file.write("Proton: " + f.readline().strip() + "\n")