Skip to content

Commit

Permalink
add some clarifications to the library docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus committed Mar 19, 2024
1 parent 3ccdc28 commit 6c2dade
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib.rs
Expand Up @@ -40,6 +40,8 @@
//! [`debug!`]: ./macro.debug.html
//! [`trace!`]: ./macro.trace.html
//! [`println!`]: https://doc.rust-lang.org/stable/std/macro.println.html
//!
//! Avoid writing expressions with side-effects in log statements. They may not be evaluated.
//!
//! ## In libraries
//!
Expand Down Expand Up @@ -1149,6 +1151,11 @@ pub trait Log: Sync + Send {
fn log(&self, record: &Record);

/// Flushes any buffered records.
///
/// # For implementors
///
/// This method isn't called automatically by the `log!` macros.
/// It can be called manually on shut-down to ensure any in-flight records are flushed.
fn flush(&self);
}

Expand Down

0 comments on commit 6c2dade

Please sign in to comment.