View Issue Details

IDProjectCategoryView StatusLast Update
0004689Spring engineGeneralpublic2015-03-01 23:41
Reporteruser744Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Summary0004689: enable logfile rotation as default
DescriptionAfter a crash: Sometimes infologs.txt gets lost because the player is eager to get back to playing as quick as possible.
So the infolog files get overwritten.

One can make a copy of the log before restarting spring, but players might already have restarted spring before someone can tell them what to do.
Or sometimes it is forgotten.

Maybe if spring has crashed, the logfile could *somehow* be saved from being overwritten.
For example by copying the file into a different folder, like spring\crashlogs\
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Jools

2015-02-28 20:51

reporter   ~0014099

That's a good idea. Although I think there is a way to set spring to append logfiles instead of overwriting them, at least I don't know how to do that.

abma

2015-03-01 23:35

administrator   ~0014104

this functionality partly already exists:

just set RotateLogFiles = 1



to implement this, https://github.com/spring/spring/blob/develop/rts/System/LogOutput.cpp#L224 has to be changed:

so old files are renamed to

infolog.1.txt
infolog.2.txt

... n

and anything > n is overwritten / deleted.

Issue History

Date Modified Username Field Change
2015-02-28 19:51 user744 New Issue
2015-02-28 20:51 Jools Note Added: 0014099
2015-03-01 23:35 abma Note Added: 0014104
2015-03-01 23:41 abma Summary do not overwrite infolog.txt after a crash => enable logfile rotation as default