diff --git a/vhost-device-can/src/can.rs b/vhost-device-can/src/can.rs index b250000..47a1fbc 100644 --- a/vhost-device-can/src/can.rs +++ b/vhost-device-can/src/can.rs @@ -160,7 +160,7 @@ impl CanController { pub fn read_can_socket(controller: Arc>) -> Result<()> { let can_name = &controller.read().unwrap().can_name.clone(); - dbg!("Start reading from {} socket!", &can_name); + log::debug!("Start reading from {can_name} socket!"); let socket = match CanFdSocket::open(can_name) { Ok(socket) => socket, Err(_) => { @@ -182,7 +182,7 @@ impl CanController { loop { // If the status variable is false then break and exit. if !controller.read().unwrap().status { - dbg!("exit read can thread"); + log::debug!("exit read can thread"); return Ok(()); } diff --git a/vhost-device-i2c/src/vhu_i2c.rs b/vhost-device-i2c/src/vhu_i2c.rs index f63ed01..fbc754e 100644 --- a/vhost-device-i2c/src/vhu_i2c.rs +++ b/vhost-device-i2c/src/vhu_i2c.rs @@ -306,7 +306,7 @@ impl VhostUserBackendMut for VhostUserI2cB } fn set_event_idx(&mut self, enabled: bool) { - dbg!(self.event_idx = enabled); + self.event_idx = enabled; } fn update_memory(&mut self, mem: GuestMemoryAtomic) -> IoResult<()> { diff --git a/vhost-device-rng/src/vhu_rng.rs b/vhost-device-rng/src/vhu_rng.rs index 0347593..b6ecabf 100644 --- a/vhost-device-rng/src/vhu_rng.rs +++ b/vhost-device-rng/src/vhu_rng.rs @@ -232,7 +232,7 @@ impl VhostUserBackendMut for VuRngBacke } fn set_event_idx(&mut self, enabled: bool) { - dbg!(self.event_idx = enabled); + self.event_idx = enabled; } fn update_memory( diff --git a/vhost-device-vsock/src/thread_backend.rs b/vhost-device-vsock/src/thread_backend.rs index 29fc119..72cf783 100644 --- a/vhost-device-vsock/src/thread_backend.rs +++ b/vhost-device-vsock/src/thread_backend.rs @@ -508,7 +508,7 @@ impl VsockThreadBackend { /// Enqueue RST packets to be sent to guest. fn enq_rst(&mut self) { // TODO - dbg!("New guest conn error: Enqueue RST"); + log::debug!("New guest conn error: Enqueue RST"); } } diff --git a/vhost-device-vsock/src/vhu_vsock_thread.rs b/vhost-device-vsock/src/vhu_vsock_thread.rs index c974108..74b4dba 100644 --- a/vhost-device-vsock/src/vhu_vsock_thread.rs +++ b/vhost-device-vsock/src/vhu_vsock_thread.rs @@ -456,7 +456,7 @@ impl VhostUserVsockThread { .push_back(ConnMapKey::new(conn.local_port, conn.peer_port)); } Err(e) => { - dbg!("Error: {:?}", e); + log::debug!("Error: {e:?}"); } } return; @@ -743,7 +743,7 @@ impl VhostUserVsockThread { ) { Ok(pkt) => pkt, Err(e) => { - dbg!("vsock: error reading TX packet: {:?}", e); + log::debug!("vsock: error reading TX packet: {e:?}"); continue; } }; diff --git a/vhost-device-vsock/src/vsock_conn.rs b/vhost-device-vsock/src/vsock_conn.rs index c52d2c0..39bbba4 100644 --- a/vhost-device-vsock/src/vsock_conn.rs +++ b/vhost-device-vsock/src/vsock_conn.rs @@ -252,7 +252,7 @@ impl VsockCon Some(buf) => { if let Err(err) = self.send_bytes(buf) { // TODO: Terminate this connection - dbg!("err:{:?}", err); + log::debug!("err:{err:?}"); return Ok(()); } } @@ -318,12 +318,12 @@ impl VsockCon if e.kind() == ErrorKind::WouldBlock { 0 } else { - dbg!("send_bytes error: {:?}", e); + log::debug!("send_bytes error: {e:?}"); return Err(Error::StreamWrite); } } Err(e) => { - dbg!("send_bytes error: {:?}", e); + log::debug!("send_bytes error: {e:?}"); return Err(Error::StreamWrite); } };