rs_utils/log/kv/
mod.rs

1//! The usual key-value format for log macros is to put the keys before the
2//! message, the macros in this module reverses this order so that the log
3//! message comes before the key/value pairs.
4
5#[cfg(feature="env-logger-format")]
6#[cfg_attr(docsrs, doc(cfg(feature="env-logger-format")))]
7pub mod format;
8#[cfg(feature="env-logger-format")]
9#[cfg_attr(docsrs, doc(cfg(feature="env-logger-format")))]
10pub use self::format::*;
11
12pub use log::LevelFilter;
13
14pub macro trace {
15  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
16    super::trace!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
17  }
18}
19pub macro debug {
20  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
21    super::debug!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
22  }
23}
24pub macro info {
25  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
26    super::info!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
27  }
28}
29pub macro warn {
30  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
31    super::warn!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
32  }
33}
34pub macro error {
35  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
36    super::error!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
37  }
38}