Freeorion does not rotate logs

Describe your experience with the latest version of FreeOrion to help us improve it.

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.
Post Reply
Message
Author
ThinkSome
Psionic Snowflake
Posts: 460
Joined: Sun Mar 29, 2020 11:13 pm

Freeorion does not rotate logs

#1 Post by ThinkSome »

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.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Freeorion does not rotate logs

#2 Post by Geoff the Medio »

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.

User avatar
Oberlus
Cosmic Dragon
Posts: 5760
Joined: Mon Apr 10, 2017 4:25 pm

Re: Freeorion does not rotate logs

#3 Post by Oberlus »

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.
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?
While at it, change default max number of autosaves to 50?

Add to every log name some identifier, like timestamp of creation.

ThinkSome
Psionic Snowflake
Posts: 460
Joined: Sun Mar 29, 2020 11:13 pm

Re: Freeorion does not rotate logs

#4 Post by ThinkSome »

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.

User avatar
Oberlus
Cosmic Dragon
Posts: 5760
Joined: Mon Apr 10, 2017 4:25 pm

Re: Freeorion does not rotate logs

#5 Post by Oberlus »

ThinkSome wrote: Mon Apr 27, 2020 11:34 am Deleting old log files is left as an exercise to the user.
No. I want it to be automatic.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Freeorion does not rotate logs

#6 Post by Geoff the Medio »

ThinkSome wrote: Mon Apr 27, 2020 11:34 am534M /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.
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.

Post Reply