From de8da59e56eaf100d9e74ebc80531ad5031fa2d6 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 5 Jul 2020 23:46:23 +0800 Subject: [PATCH] adjust logging levels --- src/runtime/src/comms.rs | 6 +++--- src/runtime/src/kernel.rs | 6 +++--- src/runtime/src/rpc.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index 86fac79..af4e2b2 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -4,7 +4,7 @@ use core::str::Utf8Error; use alloc::rc::Rc; use alloc::sync::Arc; use alloc::{vec, vec::Vec, string::String}; -use log::{debug, warn, error}; +use log::{info, warn, error}; use num_derive::{FromPrimitive, ToPrimitive}; use num_traits::{FromPrimitive, ToPrimitive}; @@ -90,7 +90,7 @@ async fn read_request(stream: &TcpStream, allow_close: bool) -> Result { if allow_close { - debug!("peer closed connection"); + info!("peer closed connection"); return Ok(None); } else { error!("peer unexpectedly closed connection"); @@ -210,7 +210,7 @@ async fn handle_run_kernel(stream: &TcpStream, control: &Rc>) -> Result<()> { expect(stream, b"ARTIQ coredev\n").await?; - debug!("received connection"); + info!("received connection"); loop { let request = read_request(stream, true).await?; if request.is_none() { diff --git a/src/runtime/src/kernel.rs b/src/runtime/src/kernel.rs index b7006a8..9aa6c44 100644 --- a/src/runtime/src/kernel.rs +++ b/src/runtime/src/kernel.rs @@ -1,5 +1,5 @@ use core::{ptr, mem}; -use log::{debug, error}; +use log::{debug, info, error}; use alloc::{vec::Vec, sync::Arc}; use cslice::CSlice; @@ -349,7 +349,7 @@ pub fn main_core1() { } }, Message::StartRequest => { - debug!("kernel starting"); + info!("kernel starting"); if let Some(__modinit__) = current_modinit { unsafe { KERNEL_CHANNEL_0TO1 = mem::transmute(&mut core1_rx); @@ -362,7 +362,7 @@ pub fn main_core1() { KERNEL_CHANNEL_1TO0 = ptr::null_mut(); } } - debug!("kernel finished"); + info!("kernel finished"); core1_tx.send(Message::KernelFinished); } _ => error!("Core1 received unexpected message: {:?}", message), diff --git a/src/runtime/src/rpc.rs b/src/runtime/src/rpc.rs index 6440cee..36fb791 100644 --- a/src/runtime/src/rpc.rs +++ b/src/runtime/src/rpc.rs @@ -1,7 +1,7 @@ use core::str; use core::future::Future; use cslice::{CSlice, CMutSlice}; -use log::debug; +use log::trace; use core_io::{Write, Error}; use libboard_zynq::smoltcp; @@ -93,7 +93,7 @@ pub async fn recv_return(stream: &TcpStream, tag_bytes: &[u8], data: *mut (), where F: Future { let mut it = TagIterator::new(tag_bytes); - debug!("recv ...->{}", it); + trace!("recv ...->{}", it); let tag = it.next().expect("truncated tag"); let mut data = data; @@ -187,7 +187,7 @@ pub fn send_args(writer: &mut W, service: u32, tag_bytes: &[u8], data: *const let mut args_it = TagIterator::new(arg_tags_bytes); let return_it = TagIterator::new(return_tag_bytes); - debug!("send<{}>({})->{}", service, args_it, return_it); + trace!("send<{}>({})->{}", service, args_it, return_it); writer.write_u32(service)?; for index in 0.. {