Why Is There No `log::flush()`?
AldaronLau opened this issue · 2 comments
AldaronLau commented
A library that depends on the log crate can't flush buffered messages without depending on a logging implementation. It doesn't make much sense to me that the flush()
method is required for Log
implementations, unused by the log crate, and also inaccessible to potential callers (unless the type implementing Log
is exposed by the crate with the logger implementation, in which case it's only available for application consumers and not libraries).
sfackler commented
log::logger().flush()
.
AldaronLau commented
Thanks, I missed that when looking through the docs!