Skip to content

logger: Recreate output log files if they get deleted

Ryan Gonzalez requested to merge wip/refi64/recreate-log-file into main

Before writing a log line to the file, first check to make sure that it's still around. If not, then just re-create it, so that clearing the current logs out doesn't actually stop future logs from appearing.

This takes advantage of the existing fstat() setup that checks the file size and swaps it out with stat() to be able to pick up on the file going missing. (That change shouldn't introduce any notable race conditions on the directory side, because srt-logger has already chdir'd into the log file directly, and self->filename isn't a full path in the first place.)

steamrt/tasks#487

Signed-off-by: Ryan Gonzalez ryan.gonzalez@collabora.com

Merge request reports

Loading