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<()> {
|
pub fn read_can_socket(controller: Arc<RwLock<CanController>>) -> Result<()> {
|
||||||
let can_name = &controller.read().unwrap().can_name.clone();
|
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) {
|
let socket = match CanFdSocket::open(can_name) {
|
||||||
Ok(socket) => socket,
|
Ok(socket) => socket,
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
|
|
@ -182,7 +182,7 @@ impl CanController {
|
||||||
loop {
|
loop {
|
||||||
// If the status variable is false then break and exit.
|
// If the status variable is false then break and exit.
|
||||||
if !controller.read().unwrap().status {
|
if !controller.read().unwrap().status {
|
||||||
dbg!("exit read can thread");
|
log::debug!("exit read can thread");
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ impl<D: 'static + I2cDevice + Sync + Send> VhostUserBackendMut for VhostUserI2cB
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_event_idx(&mut self, enabled: bool) {
|
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<()> {
|
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) {
|
fn set_event_idx(&mut self, enabled: bool) {
|
||||||
dbg!(self.event_idx = enabled);
|
self.event_idx = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_memory(
|
fn update_memory(
|
||||||
|
|
|
||||||
|
|
@ -508,7 +508,7 @@ impl VsockThreadBackend {
|
||||||
/// Enqueue RST packets to be sent to guest.
|
/// Enqueue RST packets to be sent to guest.
|
||||||
fn enq_rst(&mut self) {
|
fn enq_rst(&mut self) {
|
||||||
// TODO
|
// 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));
|
.push_back(ConnMapKey::new(conn.local_port, conn.peer_port));
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
dbg!("Error: {:?}", e);
|
log::debug!("Error: {e:?}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
@ -743,7 +743,7 @@ impl VhostUserVsockThread {
|
||||||
) {
|
) {
|
||||||
Ok(pkt) => pkt,
|
Ok(pkt) => pkt,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
dbg!("vsock: error reading TX packet: {:?}", e);
|
log::debug!("vsock: error reading TX packet: {e:?}");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ impl<S: AsRawFd + ReadVolatile + Write + WriteVolatile + IsHybridVsock> VsockCon
|
||||||
Some(buf) => {
|
Some(buf) => {
|
||||||
if let Err(err) = self.send_bytes(buf) {
|
if let Err(err) = self.send_bytes(buf) {
|
||||||
// TODO: Terminate this connection
|
// TODO: Terminate this connection
|
||||||
dbg!("err:{:?}", err);
|
log::debug!("err:{err:?}");
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -318,12 +318,12 @@ impl<S: AsRawFd + ReadVolatile + Write + WriteVolatile + IsHybridVsock> VsockCon
|
||||||
if e.kind() == ErrorKind::WouldBlock {
|
if e.kind() == ErrorKind::WouldBlock {
|
||||||
0
|
0
|
||||||
} else {
|
} else {
|
||||||
dbg!("send_bytes error: {:?}", e);
|
log::debug!("send_bytes error: {e:?}");
|
||||||
return Err(Error::StreamWrite);
|
return Err(Error::StreamWrite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
dbg!("send_bytes error: {:?}", e);
|
log::debug!("send_bytes error: {e:?}");
|
||||||
return Err(Error::StreamWrite);
|
return Err(Error::StreamWrite);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue