macro_rules! event_report {
($level:expr, $err:expr) => { ... };
($level:expr, $err:expr, $($arg:tt)*) => { ... };
(@raw $level:expr, $err:expr) => { ... };
(@raw $level:expr, $err:expr, $($arg:tt)*) => { ... };
}Expand description
Log a Report of a provided error at a given level, or a
higher level if appropriate.
If ErrorKind::is_always_a_warning returns true for the error’s kind, or
if the runtime protocol-warning policy is active and the error’s kind is
ErrorKind::TorProtocolViolation, we log it at WARN when the requested
level is lower than WARN.
§Examples
use tor_error::event_report;
use tracing::Level;
event_report!(Level::DEBUG, err, "Couldn't chew gum while walking");
event_report!(Level::TRACE, err, attempt = %num, "Ephemeral error");§Limitations
This macro does not support the full range of syntaxes supported by
tracing::event!.