Don't overwrite output_log.txt between runs

I’m looking for a way to keep the information in the output_log.txt file between runs of the application. As far as I can tell, Unity clears the file every time the application is started. This is what I’m trying to prevent.

Right now I have a coroutine that copies the output_log.txt file to a folder every couple of seconds. The issue with this solution is that if a crash happens, the most important lines in outpot_log.txt from just before the application crashed probably won’t be copied. So I’m looking for a solution or an improvement to the solution I already have.

Any help would be appreciated!

In the advent of a crash, Unity makes a copy of output_log.txt, along with crash.dmp and error.log, and stores them in a subdirectory of GAMENAME_Data named the datetime of the crash.

I also often want play data from previous sessions that don’t cause crashes. I considered using a Debug.Log wrapper that keeps its own independent log file, but it can’t catch all internal Unity or DLL exceptions. Your method of duplicating output_log.txt regularly may be the best bet. Make sure you call it one last time during OnApplicationQuit, which should always run when the app quits correctly.