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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/*!
## This crate provide prints macros that are not compiled in releases builds.
## Macros are enabled using ENV variable APP_DEBUG
### Basic usage
```
use easy_debug::{dbg_print, dbg_println, dbg_eprint, dbg_eprintln};
let debug_str_val = "debug string value";
dbg_print!("debug_str_val");
dbg_println!("debug_str_val = {}", debug_str_val);
dbg_eprint!("I'm printing to the Standard Error");
dbg_eprintln!("Print to Standard Error");
```
### Macros names with aliasing
```
use easy_debug::{
dbg_print as dbg_p,
dbg_println as dbg_pln,
dbg_eprint as dbg_ep,
dbg_eprintln as dbg_epln,
};
let debug_str_val = "debug string value";
dbg_p!("debug_str_val");
dbg_pln!("debug_str_val = {}", debug_str_val);
dbg_ep!("I'm printing to the Standard Error");
dbg_epln!("Print to Standard Error");
```
### Extended macros names with aliasing
```
use easy_debug::{
dbg_xprint as dbg_xp,
dbg_xprintln as dbg_xpln,
dbg_xeprint as dbg_xep,
dbg_exprintln as dbg_xepln,
};
let debug_str_val = "debug string value";
dbg_xp!("debug_str_val");
dbg_xpln!("debug_str_val = {}", debug_str_val);
dbg_xep!("I'm printing to the Standard Error");
dbg_xepln!("Print to Standard Error");
```
*/
/// ----------------------------------------------------------------
/// BASIC print, println, eprint, eprintln functions
/// ----------------------------------------------------------------
/// Prints to the standard ouput only in debug build.
/// In release build this macro is not compiled thanks to `#[cfg(debug_assertions)]`.
/// see [https://doc.rust-lang.org/std/macro.print.html](https://doc.rust-lang.org/std/macro.print.html) for more info.
/// Prints to the standard error only in debug build.
/// In release build this macro is not compiled thanks to `#[cfg(debug_assertions)]`.
/// see [https://doc.rust-lang.org/std/macro.eprint.html](https://doc.rust-lang.org/std/macro.eprint.html) for more info.
/// ----------------------------------------------------------------
/// EXTENDED print, println, eprint, eprintln functions
/// Print also module name that is calling function
/// ----------------------------------------------------------------
/// Prints to the standard ouput only in debug build.
/// In release build this macro is not compiled thanks to `#[cfg(debug_assertions)]`.
/// see [https://doc.rust-lang.org/std/macro.print.html](https://doc.rust-lang.org/std/macro.print.html) for more info.
/// Prints to the standard error only in debug build.
/// In release build this macro is not compiled thanks to `#[cfg(debug_assertions)]`.
/// see [https://doc.rust-lang.org/std/macro.eprint.html](https://doc.rust-lang.org/std/macro.eprint.html) for more info.