Make debug logging into an optional feature

This commit is contained in:
Michael Mikovsky
2025-11-11 11:00:28 -07:00
parent 379b6a7e25
commit 258599c9c7
12 changed files with 151 additions and 38 deletions
+9 -3
View File
@@ -25,9 +25,15 @@ impl RuntimeTest {
Self {
thread_handle: thread::spawn(move || {
info!("Connecting to server...");
let mut stream = TcpStream::connect("localhost:1234").unwrap();
info!("Connectied");
debug!("Connecting to server...");
let mut stream = match TcpStream::connect("localhost:1234") {
Ok(stream) => stream,
Err(e) => {
error!("Failed to connect to server: {}", e);
return;
}
};
info!("Connected");
// let reader = BufReader::new(stream.try_clone().unwrap());
// let mut writer = BufWriter::new(stream.try_clone().unwrap());