From ef4bdbb668105107d28fd17ce5ebc2e924a334ab Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 7 Jun 2020 20:23:43 +0800 Subject: [PATCH] rpc: enable logging --- src/runtime/src/rpc.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/runtime/src/rpc.rs b/src/runtime/src/rpc.rs index 3d4991e..7fed3ed 100644 --- a/src/runtime/src/rpc.rs +++ b/src/runtime/src/rpc.rs @@ -1,5 +1,6 @@ use core::str; use cslice::{CSlice, CMutSlice}; +use log::debug; use core_io::{Read, Write, Error}; @@ -84,7 +85,6 @@ pub fn recv_return(reader: &mut R, tag_bytes: &[u8], data: *mut (), E: From { let mut it = TagIterator::new(tag_bytes); - #[cfg(feature = "log")] debug!("recv ...->{}", it); let tag = it.next().expect("truncated tag"); @@ -178,11 +178,8 @@ pub fn send_args(writer: &mut W, service: u32, tag_bytes: &[u8], data: *const let (arg_tags_bytes, return_tag_bytes) = split_tag(tag_bytes); let mut args_it = TagIterator::new(arg_tags_bytes); - #[cfg(feature = "log")] - { - let return_it = TagIterator::new(return_tag_bytes); - debug!("send<{}>({})->{}", service, args_it, return_it); - } + let return_it = TagIterator::new(return_tag_bytes); + debug!("send<{}>({})->{}", service, args_it, return_it); writer.write_u32(service)?; for index in 0.. {