mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
4552975f37stopped flushing INFO/DEBUG lines to the log file and only flushed [ERROR] and [WARN], to save the per-line fflush cost. In practice that costs more than it saves: - When RetroArch crashes, the lines that explain the crash are usually the informational ones written just before it. Those were exactly the lines left sitting in stdio's buffer and lost, which makes crash reports much harder to read in the cases where gdb does not help. - Anything following the log live (tail -f, monitoring scripts) saw nothing until the buffer happened to fill (#19571). Go back to the previous behaviour: one write and one flush per line, for every tag. rarch_log_tag_wants_flush() and the flush parameter on rarch_log_line_emit() are removed. The strcmp tag matching for the Android log priority fromafd57d615estays - that overread fix is independent of the flush policy. The log-atomicity harness's flush lane now asserts the promise that matters: a RARCH_LOG (informational) line must be readable from the file as soon as the call returns, before any deinit. Fixes #19571