mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-08 22:38:01 -06:00
Payload config, disable all logs feature
This commit is contained in:
@@ -2,7 +2,7 @@ use std::{
|
||||
io::Read,
|
||||
net::TcpStream,
|
||||
sync::{
|
||||
Arc, Mutex,
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
},
|
||||
thread::{self, JoinHandle},
|
||||
|
||||
@@ -41,7 +41,7 @@ macro_rules! debug {
|
||||
}};
|
||||
($fmt:tt, $($arg:expr),*) => {{
|
||||
let _ = $fmt;
|
||||
let _ = ($($arg),*);
|
||||
$(let _ = $arg;)*
|
||||
}};
|
||||
}
|
||||
|
||||
|
||||
@@ -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;)*
|
||||
}};
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user