pub fn flush_log() -> String
Flush and return the captured log output, stopping capture (Perl: flush_log).