Skip to main content

debug_log

Macro debug_log 

Source
macro_rules! debug_log {
    ($($arg:tt)*) => { ... };
}
Expand description

調試日誌宏,支持編譯時和運行時調試模式

  • 編譯時:cfg!(debug_assertions) 自動啟用

  • 運行時:可通過 –debug 參數啟用

    支持格式化參數,使用方式與 println! 相同