mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-27 22:55:16 +01:00
* fix: keep the shared log.txt and errors.txt when the run writes multiplelogs Every start deleted log.txt and errors.txt in the game folder before the settings were read, so a run with multiplelogs (each scenario test) wiped the logs of the player's last ordinary game although it writes its own files in logs/. The shared files are now deleted after the settings, and only without multiplelogs, where the run is about to write them (an errors.txt of an earlier run must still not stay behind a run without errors). The log service keeps what is logged until then, so an early message can't open and empty log.txt before multiplelogs is known. The file names come from one place (utilities/logfiles), covered by unit tests. * refactor(log): the wait for the log file names without Sonar issues The log service skips a pass with an early continue instead of wrapping the writing in an if, so the writing keeps its nesting. No change in behaviour. * fix(log): the node bank preview tool opens its log files after the settings The log service holds every message until OpenLogFiles() is called, and only the game called it. The preview tool kept its whole log in memory and wrote it only at the end, so a crash or a killed run lost it.
49 KiB
49 KiB