pub fn flush()Expand description
Forces the active log file to flush to disk.
log::logger().flush() only triggers the flush method of the
currently registered logger, which is not guaranteed to drain the
SDK’s file handle when called via the trait object. This helper
reaches the live LoggerImpl directly and calls File::flush
under the same Mutex the writer uses, so panic hooks and
shutdown paths can persist pending lines deterministically.
No-op when the logger has not been installed.