Payload config, disable all logs feature

This commit is contained in:
Michael Mikovsky
2025-11-23 22:40:06 -07:00
parent f34ac017ce
commit 11045522b8
8 changed files with 81 additions and 10 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ use std::{
io::Read,
net::TcpStream,
sync::{
Arc, Mutex,
Arc,
atomic::{AtomicBool, Ordering},
},
thread::{self, JoinHandle},
+1 -1
View File
@@ -41,7 +41,7 @@ macro_rules! debug {
}};
($fmt:tt, $($arg:expr),*) => {{
let _ = $fmt;
let _ = ($($arg),*);
$(let _ = $arg;)*
}};
}
+45
View File
@@ -0,0 +1,45 @@
// Macros that are used that just drop the inside variables
#[macro_export]
macro_rules! debug {
($fmt:tt) => {{
let _ = $fmt;
}};
($fmt:tt, $($arg:expr),*) => {{
let _ = $fmt;
$(let _ = $arg;)*
}};
}
#[macro_export]
macro_rules! info {
($fmt:tt) => {{
let _ = $fmt;
}};
($fmt:tt, $($arg:expr),*) => {{
let _ = $fmt;
$(let _ = $arg;)*
}};
}
#[macro_export]
macro_rules! warn {
($fmt:tt) => {{
let _ = $fmt;
}};
($fmt:tt, $($arg:expr),*) => {{
let _ = $fmt;
$(let _ = $arg;)*
}};
}
#[macro_export]
macro_rules! error {
($fmt:tt) => {{
let _ = $fmt;
}};
($fmt:tt, $($arg:expr),*) => {{
let _ = $fmt;
$(let _ = $arg;)*
}};
}
+6
View File
@@ -1,4 +1,10 @@
// Choose if the macros are enabled based on the feature setting
#[cfg(feature = "log")]
pub mod macros;
#[cfg(not(feature = "log"))]
pub mod macros_disabled;
mod pretty_logger;
use std::time::SystemTime;