with-FreeOrionSDK-v11-356-ge978c5e27
~/.local/share/freeorion/freeorion.log seems to be overwritten on every run. This, together with only keeping last 10 autosaves is a cannon-to-the-foot for any debugging efforts.
Freeorion does not rotate logs
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Freeorion does not rotate logs
A system of rotating logs, with the last X kept, determined by an in-game option, is a good suggestion.
Might get impractical if all the AI logs are also kept, as the number of files could quickly multiply, though.
Might get impractical if all the AI logs are also kept, as the number of files could quickly multiply, though.
Re: Freeorion does not rotate logs
Add two new options (in Autosave tab) to specify one number for rotated client&server logs and one number for rotated AI logs. Default to 3 and 3?Geoff the Medio wrote: ↑Mon Apr 27, 2020 7:15 am A system of rotating logs, with the last X kept, determined by an in-game option, is a good suggestion.
Might get impractical if all the AI logs are also kept, as the number of files could quickly multiply, though.
While at it, change default max number of autosaves to 50?
Add to every log name some identifier, like timestamp of creation.
Re: Freeorion does not rotate logs
Hmm, I think that if you must delete old logs, then making it time-based would be better. If someone reports an issue and does not attach a save file, they will be asked to attach one. However, there is probably no way to predict how many turns will pass until they respond.
You can reuse some of the code I wrote to add log-rotate to Springlobby :
https://framagit.org/specing/springlobb ... 93dc2d7eea
https://framagit.org/specing/springlobb ... 9bb40065bb
Deleting old log files is left as an exercise to the user.
534M /home/specing/.springlobby/logs
^ 4 months of having the client open ~8h/day and it logging pretty much everything in debug mode. I find this quite acceptable.
You can reuse some of the code I wrote to add log-rotate to Springlobby :
https://framagit.org/specing/springlobb ... 93dc2d7eea
https://framagit.org/specing/springlobb ... 9bb40065bb
Deleting old log files is left as an exercise to the user.
534M /home/specing/.springlobby/logs
^ 4 months of having the client open ~8h/day and it logging pretty much everything in debug mode. I find this quite acceptable.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Freeorion does not rotate logs
I have a test freeorion save with 8 or so AI players and one human on turn 265. After turning effects logging to trace level, just opening the save, not even pressing turn, generates 800 MB of log files.