mf_core/
debug.rs

1/// 调试工具模块
2///
3/// 提供条件编译的调试输出宏,只在开发模式下启用
4/// 条件调试宏 - 只在启用 debug-logs 特性时才输出
5#[cfg(feature = "debug-logs")]
6pub use mf_state::debug;
7
8/// 生产环境下的空调试宏
9#[cfg(not(feature = "debug-logs"))]
10macro_rules! debug {
11    ($($arg:tt)*) => {
12        () // 生产环境下不输出任何调试信息,返回unit类型
13    };
14}
15
16#[cfg(not(feature = "debug-logs"))]
17pub(crate) use debug;
18
19/// 条件信息输出宏 - 信息输出在生产环境中保留
20pub use mf_state::info;
21
22/// 警告和错误在生产环境中保留
23pub use mf_state::{warn, error};