toml_query/log.rs
1//
2// This Source Code Form is subject to the terms of the Mozilla Public
3// License, v. 2.0. If a copy of the MPL was not distributed with this
4// file, You can obtain one at http://mozilla.org/MPL/2.0/.
5//
6
7//! If logging is not compiled into the library, this module defines the logging macros to result
8//! in nothing.
9
10/// This macro is defined if the `logging` feature is _not_ compiled into the library
11///
12/// It ignores all logging calls inside the library.
13#[cfg(not(feature = "logging"))]
14#[macro_export]
15macro_rules! debug {
16 (target: $target:expr, $($arg:tt)*) => {};
17 ($($arg:tt)*) => {};
18}
19
20/// This macro is defined if the `logging` feature is _not_ compiled into the library
21///
22/// It ignores all logging calls inside the library.
23#[cfg(not(feature = "logging"))]
24#[macro_export]
25macro_rules! error {
26 (target: $target:expr, $($arg:tt)*) => {};
27 ($($arg:tt)*) => {};
28}
29
30/// This macro is defined if the `logging` feature is _not_ compiled into the library
31///
32/// It ignores all logging calls inside the library.
33#[cfg(not(feature = "logging"))]
34#[macro_export]
35macro_rules! info {
36 (target: $target:expr, $($arg:tt)*) => {};
37 ($($arg:tt)*) => {};
38}
39
40/// This macro is defined if the `logging` feature is _not_ compiled into the library
41///
42/// It ignores all logging calls inside the library.
43#[cfg(not(feature = "logging"))]
44#[macro_export]
45macro_rules! log {
46 (target: $target:expr, $($arg:tt)*) => {};
47 ($($arg:tt)*) => {};
48}
49
50/// This macro is defined if the `logging` feature is _not_ compiled into the library
51///
52/// It ignores all logging calls inside the library.
53#[cfg(not(feature = "logging"))]
54#[macro_export]
55macro_rules! trace {
56 (target: $target:expr, $($arg:tt)*) => {};
57 ($($arg:tt)*) => {};
58}
59
60/// This macro is defined if the `logging` feature is _not_ compiled into the library
61///
62/// It ignores all logging calls inside the library.
63#[cfg(not(feature = "logging"))]
64#[macro_export]
65macro_rules! warn {
66 (target: $target:expr, $($arg:tt)*) => {};
67 ($($arg:tt)*) => {};
68}