From 56fcbd64ed7fc64ee8d60e2012679d3abd87ffb0 Mon Sep 17 00:00:00 2001 From: lubeilin <1791778603@qq.com> Date: Fri, 22 Sep 2023 22:43:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnt-cli/src/command/mod.rs | 2 +- vnt-cli/src/command/server.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vnt-cli/src/command/mod.rs b/vnt-cli/src/command/mod.rs index ca45ad6..dbd1759 100644 --- a/vnt-cli/src/command/mod.rs +++ b/vnt-cli/src/command/mod.rs @@ -17,7 +17,7 @@ pub enum CommandEnum { pub fn command(cmd: CommandEnum) { if let Err(e) = command_(cmd) { - println!("cmd: {}", e); + println!("cmd: {:?}", e); } } diff --git a/vnt-cli/src/command/server.rs b/vnt-cli/src/command/server.rs index 2de1089..75b0a22 100644 --- a/vnt-cli/src/command/server.rs +++ b/vnt-cli/src/command/server.rs @@ -26,6 +26,7 @@ impl CommandServer { let (len, addr) = udp.recv_from(&mut buf).await?; match std::str::from_utf8(&buf[..len]) { Ok(cmd) => { + log::info!("收到cmd={:?}", cmd); if let Ok(out) = command(cmd, &vnt) { if let Err(e) = udp.send_to(out.as_bytes(), addr).await { log::warn!("cmd={},err={:?}", cmd, e);