toml_query/log.rs
1//! If logging is not compiled into the library, this module defines the logging macros to result
2//! in nothing.
3
4/// This macro is defined if the `logging` feature is _not_ compiled into the library
5///
6/// It ignores all logging calls inside the library.
7#[cfg(not(feature = "logging"))]
8#[macro_export]
9macro_rules! debug {
10 (target: $target:expr, $($arg:tt)*) => {};
11 ($($arg:tt)*) => {};
12}
13
14/// This macro is defined if the `logging` feature is _not_ compiled into the library
15///
16/// It ignores all logging calls inside the library.
17#[cfg(not(feature = "logging"))]
18#[macro_export]
19macro_rules! error {
20 (target: $target:expr, $($arg:tt)*) => {};
21 ($($arg:tt)*) => {};
22}
23
24/// This macro is defined if the `logging` feature is _not_ compiled into the library
25///
26/// It ignores all logging calls inside the library.
27#[cfg(not(feature = "logging"))]
28#[macro_export]
29macro_rules! info {
30 (target: $target:expr, $($arg:tt)*) => {};
31 ($($arg:tt)*) => {};
32}
33
34/// This macro is defined if the `logging` feature is _not_ compiled into the library
35///
36/// It ignores all logging calls inside the library.
37#[cfg(not(feature = "logging"))]
38#[macro_export]
39macro_rules! log {
40 (target: $target:expr, $($arg:tt)*) => {};
41 ($($arg:tt)*) => {};
42}
43
44/// This macro is defined if the `logging` feature is _not_ compiled into the library
45///
46/// It ignores all logging calls inside the library.
47#[cfg(not(feature = "logging"))]
48#[macro_export]
49macro_rules! trace {
50 (target: $target:expr, $($arg:tt)*) => {};
51 ($($arg:tt)*) => {};
52}
53
54/// This macro is defined if the `logging` feature is _not_ compiled into the library
55///
56/// It ignores all logging calls inside the library.
57#[cfg(not(feature = "logging"))]
58#[macro_export]
59macro_rules! warn {
60 (target: $target:expr, $($arg:tt)*) => {};
61 ($($arg:tt)*) => {};
62}