Replace invalid dbg! use with log::debug!
dbg! does not use format specifiers and prints in stderr regardless of log output. Use log::debug! instead. Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This commit is contained in:
parent
1dc341508c
commit
926ea9b1c8
6 changed files with 10 additions and 10 deletions
|
|
@ -160,7 +160,7 @@ impl CanController {
|
|||
|
||||
pub fn read_can_socket(controller: Arc<RwLock<CanController>>) -> 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(());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ impl<D: 'static + I2cDevice + Sync + Send> 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<GuestMemoryMmap>) -> IoResult<()> {
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ impl<T: 'static + ReadVolatile + Sync + Send> VhostUserBackendMut for VuRngBacke
|
|||
}
|
||||
|
||||
fn set_event_idx(&mut self, enabled: bool) {
|
||||
dbg!(self.event_idx = enabled);
|
||||
self.event_idx = enabled;
|
||||
}
|
||||
|
||||
fn update_memory(
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ impl<S: AsRawFd + ReadVolatile + Write + WriteVolatile + IsHybridVsock> 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<S: AsRawFd + ReadVolatile + Write + WriteVolatile + IsHybridVsock> 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);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue