Skip to content

Commit

Permalink
Add doc string to info_or_print method
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreae committed Jun 25, 2024
1 parent 275b206 commit a16d3ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aquadoggo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ fn init() {
}
}

/// Helper method for logging a message directly to standard out or via the `log` crate when any
/// logging level is enabled. We need this as some messages should be always printed, but when any
/// logging level is selected, we want the message to be printed with consistent formatting.
fn info_or_print(message: &str) {
if log_enabled!(Level::Info) || log_enabled!(Level::Debug) || log_enabled!(Level::Trace) {
info!("{message}");
Expand Down

0 comments on commit a16d3ef

Please sign in to comment.