ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
23.85k stars 1.04k forks source link

Add option to never overwrite Proton log and create new file with timestamp instead #5432

Open minecraft2048 opened 2 years ago

minecraft2048 commented 2 years ago

Feature Request

I confirm:

Description

Add a new launch option (PROTON_LOG_NO_OVERWRITE?) that instead of overwriting the same file (steam-gameid.log) every launch, it creates new files every launch, so when I restart the game, the old log is still there

Justification [optional]

Every time my FF14 randomly crashes I immediately restarted the game because usually it crashed during duty, but then if I restarted the game Proton will overwrite the log, and so I won't have debug log from the crash

aeikum commented 2 years ago

I don't want to add an option to easily allow a user to accidentally fill their disk. A compromise might be to keep one previous log file for each game (e.g. on each launch, rename steam-1234.log to steam-1234.log.old instead of just removing it). However that doesn't quite solve your problem, just pushes it off from one launch to two launches.

I'm not sure what you mean by "crashed during duty." Is just renaming the crashed log file yourself a reasonable solution to this problem for you?

ipr commented 2 years ago

You can fill a disk with a single logfile as well (some games cause a lot logging) but there is an alternative which could be more work to implement: adding log rotation such that at most n logfiles would exist. This might be too much work for something that is basically a debugging feature.

Instead of blindly making a new copy of the log each time, how about detection if game crashed or exited abnormally and then keeping the previous log? This isn't foolproof though and leaves open cases.

"Short log" might be useful for another situation where you need a long session to trigger a problem: this would keep only n most recent lines in the log (a ring buffer) and would overwrite the oldest lines. This has other problems like you would need separately information from when it was started (to log parameters and environment setttings).

But all of these are extra for something that is only to track problems (to aid in debugging) so it might not be worth it to have these.