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")]
6pub mod format;
7#[cfg(feature="env-logger-format")]
8pub use self::format::*;
9
10pub use log::LevelFilter;
11
12pub macro trace {
13  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
14    super::trace!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
15  }
16}
17pub macro debug {
18  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
19    super::debug!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
20  }
21}
22pub macro info {
23  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
24    super::info!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
25  }
26}
27pub macro warn {
28  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
29    super::warn!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
30  }
31}
32pub macro error {
33  ($fmtstring:expr$(, $fmtarg:expr)*$(; $($kvargs:tt)*)?) => {
34    super::error!($($($kvargs)*;)? $fmtstring$(, $fmtarg)*)
35  }
36}