Page 1 of 1
Create a persistent copy of the log file after a crash
Posted: Sun Apr 25, 2021 5:11 pm
by Loewchen
What ?
If a factorio session crashes, make a copy of the log file in the
Archive or a new
Crash folder and change the name of the file to include time, date and version of the game, similar to desync reports.
Why ?
- to avoid losing information when the game is restarted before reporting the crash
- to make it clear to the user which file contains the log of the crash he intents to report
- to have a history of all crashes that allows for easier diagnosis and to rule out hardware issues
Re: Create a persistent copy of the log file after a crash
Posted: Sun Apr 25, 2021 5:17 pm
by eradicator
+1 But keep a sane size/age limit. Some programs pointlessly accumulate logs over years.
Re: Create a persistent copy of the log file after a crash
Posted: Sun Apr 25, 2021 11:03 pm
by ssilk
Golden rule of programming: if you create many (files, entries, whatever takes memory), you need also to delete them.
An expire of these logfiles is then obligatory!
Re: Create a persistent copy of the log file after a crash
Posted: Mon Apr 26, 2021 12:00 am
by Loewchen
I don't see the need to delete them, logs are tiny and crashes are rare. The 177 logs in my download folder take up 7.9MB, that is like 1/20 of a single average desync report and we don't even delete those. An absolute size limit upon the oldest get deleted would not hurt though.
Re: Create a persistent copy of the log file after a crash
Posted: Mon Apr 26, 2021 4:02 am
by ssilk
Think to the server version. Someone starts it as a pseud-service, it loads a game, and immediately crashes...
Re: Create a persistent copy of the log file after a crash
Posted: Mon Apr 26, 2021 11:47 am
by eradicator
Loewchen wrote: Mon Apr 26, 2021 12:00 am
I don't see the need to delete them, logs are tiny and crashes are rare.
For normal users sure. But this suggestions seems to be more aimed at the kind of user who has a random crash per day and only reports it after a month?
I mean, if the only goal is to make it easier for users to send in reports then you might as well stuff them all into log-archive.zip and ask them to send the whole thing. Devs are likely more capable at finding the right log than users are.