1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Centralized debug logging with feature flag control
//!
//! This module provides conditional logging macros that are only compiled
//! when the `debug` feature is enabled. This allows release builds to
//! completely exclude debug/info logging for zero runtime overhead.
//!
//! # Usage
//!
//! ```rust,ignore
//! use crate::debug::{debug_log, info_log};
//!
//! debug_log!("This is a debug message: {}", value);
//! info_log!("This is an info message: {}", value);
//! ```
//!
//! The macros expand to nothing when the `debug` feature is not enabled,
//! ensuring zero runtime overhead in release builds.
/// Debug logging macro - only compiled when `debug` feature is enabled
/// Debug logging macro - compiles to nothing when `debug` feature is disabled
/// Info logging macro - only compiled when `debug` feature is enabled
/// Info logging macro - compiles to nothing when `debug` feature is disabled
/// Warn logging macro - always enabled (even in release builds)
/// for critical diagnostics
/// Error logging macro - always enabled (even in release builds)
/// for critical diagnostics
// Export macros for use in other modules
pub use debug_log;
pub use error_log;
pub use info_log;
pub use warn_log;