diff --git a/services/net/src/main.rs b/services/net/src/main.rs index 0ff545c00..668ec2ac5 100644 --- a/services/net/src/main.rs +++ b/services/net/src/main.rs @@ -1050,6 +1050,10 @@ fn xmain() -> ! { .wlan_get_config() .expect("couldn't retrieve updated ipv4 config"); log::info!("Network config acquired: {:?}", config); + log::info!("{}NET.OK,{:?},{}", + xous::BOOKEND_START, + std::net::IpAddr::from(config.addr), + xous::BOOKEND_END); net_config = Some(config); // note: ARP cache is stale. Maybe that's ok? diff --git a/services/pddb/src/backend/hw.rs b/services/pddb/src/backend/hw.rs index 701742eef..9d5edceed 100644 --- a/services/pddb/src/backend/hw.rs +++ b/services/pddb/src/backend/hw.rs @@ -1449,6 +1449,7 @@ impl PddbOs { let mut checkblock_a = [0u8; BLOCK_SIZE]; self.rootkeys.decrypt_block(GenericArray::from_mut_slice(&mut checkblock_a)); + log::info!("{}PDDB.CHECKPASS,{}", xous::BOOKEND_START, xous::BOOKEND_END); #[cfg(any(target_os = "none", target_os = "xous"))] // skip this dialog in hosted mode modals.show_notification(t!("pddb.checkpass", xous::LANG), None).expect("notification failed"); @@ -1459,6 +1460,7 @@ impl PddbOs { if checkblock_a == checkblock_b { success = true; } else { + log::info!("{}PDDB.PWFAIL,{}", xous::BOOKEND_START, xous::BOOKEND_END); modals.show_notification(t!("pddb.checkpass_fail", xous::LANG), None).expect("notification failed"); self.clear_password(); } diff --git a/services/pddb/src/main.rs b/services/pddb/src/main.rs index 4d5278a02..90afbb69f 100644 --- a/services/pddb/src/main.rs +++ b/services/pddb/src/main.rs @@ -545,6 +545,7 @@ fn xmain() -> ! { } else { if !pddb_os.rootkeys_initialized() { // can't mount if we have no root keys + log::info!("{}PDDB.SKIPMOUNT,{}", xous::BOOKEND_START, xous::BOOKEND_END); xous::return_scalar(msg.sender, 0).expect("could't return scalar"); } else { match ensure_password(&modals, &mut pddb_os, pw_cid) { @@ -555,6 +556,7 @@ fn xmain() -> ! { xous::return_scalar(requester, 1).expect("couldn't return scalar"); } assert!(mount_notifications.len() == 0, "apparently I don't understand what drain() does"); + log::info!("{}PDDB.MOUNTED,{}", xous::BOOKEND_START, xous::BOOKEND_END); xous::return_scalar(msg.sender, 1).expect("couldn't return scalar"); } else { xous::return_scalar(msg.sender, 0).expect("couldn't return scalar"); @@ -567,6 +569,7 @@ fn xmain() -> ! { xous::return_scalar(requester, 1).expect("couldn't return scalar"); } assert!(mount_notifications.len() == 0, "apparently I don't understand what drain() does"); + log::info!("{}PDDB.MOUNTED,{}", xous::BOOKEND_START, xous::BOOKEND_END); xous::return_scalar(msg.sender, 1).expect("couldn't return scalar"); } else { xous::return_scalar(msg.sender, 0).expect("couldn't return scalar"); @@ -1187,6 +1190,7 @@ fn ensure_password(modals: &modals::Modals, pddb_os: &mut PddbOs, _pw_cid: xous: } PasswordState::Incorrect => { pddb_os.clear_password(); // clear the bad password entry + log::info!("{}PDDB.BADPW,{}", xous::BOOKEND_START, xous::BOOKEND_END); // check if the user wants to re-try or not. modals.add_list_item(t!("pddb.yes", xous::LANG)).expect("couldn't build radio item list"); modals.add_list_item(t!("pddb.no", xous::LANG)).expect("couldn't build radio item list"); @@ -1238,6 +1242,7 @@ fn try_mount_or_format(modals: &modals::Modals, pddb_os: &mut PddbOs, basis_cach modals.add_list_item(t!("pddb.okay", xous::LANG)).expect("couldn't build radio item list"); modals.add_list_item(t!("pddb.cancel", xous::LANG)).expect("couldn't build radio item list"); let do_format: bool; + log::info!("{}PDDB.REQFMT,{}", xous::BOOKEND_START, xous::BOOKEND_END); match modals.get_radiobutton(t!("pddb.requestformat", xous::LANG)) { Ok(response) => { if response.as_str() == t!("pddb.okay", xous::LANG) { diff --git a/services/root-keys/src/main.rs b/services/root-keys/src/main.rs index 70483998e..0d1caac4a 100644 --- a/services/root-keys/src/main.rs +++ b/services/root-keys/src/main.rs @@ -473,6 +473,7 @@ fn xmain() -> ! { } else { modals.add_list_item(t!("rootkeys.confirm.yes", xous::LANG)).expect("modals error"); modals.add_list_item(t!("rootkeys.confirm.no", xous::LANG)).expect("modals error"); + log::info!("{}ROOTKEY.CONFIRM,{}", xous::BOOKEND_START, xous::BOOKEND_END); match modals.get_radiobutton(t!("rootkeys.confirm", xous::LANG)) { Ok(response) => { if response == t!("rootkeys.confirm.no", xous::LANG) { @@ -500,6 +501,7 @@ fn xmain() -> ! { ); #[cfg(feature="tts")] tts.tts_blocking(t!("rootkeys.bootpass", xous::LANG)).unwrap(); + log::info!("{}ROOTKEY.BOOTPW,{}", xous::BOOKEND_START, xous::BOOKEND_END); rootkeys_modal.activate(); } }), @@ -524,6 +526,7 @@ fn xmain() -> ! { ); #[cfg(feature="tts")] tts.tts_blocking(t!("rootkeys.updatepass", xous::LANG)).unwrap(); + log::info!("{}ROOTKEY.UPDPW,{}", xous::BOOKEND_START, xous::BOOKEND_END); rootkeys_modal.activate(); }, Some(Opcode::UxInitUpdatePasswordReturn) => { @@ -658,6 +661,7 @@ fn xmain() -> ! { }; let mut skip_confirmation = false; + log::info!("{}ROOTKEY.GWUP,{}", xous::BOOKEND_START, xous::BOOKEND_END); match modals.get_radiobutton(prompt) { Ok(response) => { if response == t!("rootkeys.gwup.short", xous::LANG) { @@ -720,6 +724,7 @@ fn xmain() -> ! { ); #[cfg(feature="tts")] tts.tts_blocking(t!("rootkeys.get_update_password", xous::LANG)).unwrap(); + log::info!("{}ROOTKEY.UPDPW,{}", xous::BOOKEND_START, xous::BOOKEND_END); rootkeys_modal.activate(); } } @@ -797,6 +802,7 @@ fn xmain() -> ! { ); #[cfg(feature="tts")] tts.tts_blocking(t!("rootkeys.get_signing_password", xous::LANG)).unwrap(); + log::info!("{}ROOTKEY.UPDPW,{}", xous::BOOKEND_START, xous::BOOKEND_END); rootkeys_modal.activate(); } }, @@ -877,6 +883,7 @@ fn xmain() -> ! { ); #[cfg(feature="tts")] tts.tts_blocking(t!("rootkeys.get_login_password", xous::LANG)).unwrap(); + log::info!("{}ROOTKEY.BOOTPW,{}", xous::BOOKEND_START, xous::BOOKEND_END); rootkeys_modal.activate(); // note that the scalar is *not* yet returned, it will be returned by the opcode called by the password assurance } else { diff --git a/services/shellchat/src/cmds/net_cmd.rs b/services/shellchat/src/cmds/net_cmd.rs index 3cdffe2bb..a98b655b3 100644 --- a/services/shellchat/src/cmds/net_cmd.rs +++ b/services/shellchat/src/cmds/net_cmd.rs @@ -104,6 +104,10 @@ impl<'a> ShellCmdApi<'a> for NetCmd { Ok(len) => { log::trace!("raw response ({}): {:?}", len, &buf[..len]); write!(ret, "{}", std::string::String::from_utf8_lossy(&buf[..len.min(buf.len())])).ok(); // let it run off the end + log::info!("{}NET.TCPGET,{},{}", + xous::BOOKEND_START, + std::string::String::from_utf8_lossy(&buf[..len.min(buf.len())]), + xous::BOOKEND_END); } Err(e) => write!(ret, "Didn't get response from host: {:?}", e).unwrap(), } @@ -147,6 +151,7 @@ impl<'a> ShellCmdApi<'a> for NetCmd { } }); write!(ret, "TCP listener started on port 80").unwrap(); + log::info!("{}NET.SERVER,{}", xous::BOOKEND_START, xous::BOOKEND_END); } "fountain" => { // anything typed after fountain will cause this to be a short test @@ -372,6 +377,13 @@ impl<'a> ShellCmdApi<'a> for NetCmd { addr, seq_or_addr, timestamp).unwrap(); + log::info!("{}NET.PONG,{:?},{},{},{}", + xous::BOOKEND_START, + addr, + seq_or_addr, + timestamp, + xous::BOOKEND_END + ); }, IpAddr::V6(_) => { write!(ret, "Ipv6 pong received: {} ms", timestamp).unwrap(); diff --git a/services/shellchat/src/cmds/rtc_cmd.rs b/services/shellchat/src/cmds/rtc_cmd.rs index 424b03ce7..294029839 100644 --- a/services/shellchat/src/cmds/rtc_cmd.rs +++ b/services/shellchat/src/cmds/rtc_cmd.rs @@ -45,11 +45,18 @@ impl<'a> ShellCmdApi<'a> for RtcCmd { timestr ) .unwrap(); + log::info!("{}RTC.LOCAL,{},{}", + xous::BOOKEND_START, + dt.format("%H,%M,%m,%d,%Y").to_string(), + xous::BOOKEND_END); } else { write!( ret, "Local time has not been set up" ).unwrap(); + log::info!("{}RTC.FAIL,{}", + xous::BOOKEND_START, + xous::BOOKEND_END); } } _ => { diff --git a/services/shellchat/src/cmds/ver.rs b/services/shellchat/src/cmds/ver.rs index d49a22a52..9e615b55d 100644 --- a/services/shellchat/src/cmds/ver.rs +++ b/services/shellchat/src/cmds/ver.rs @@ -23,7 +23,7 @@ impl<'a> ShellCmdApi<'a> for Ver { let dirtystr = if dirty { "dirty" } else { "clean" }; write!(ret, "EC gateware commit: {:x}, {}\n", rev, dirtystr).unwrap(); let (maj, min, rev, commit) = env.com.get_ec_sw_tag().unwrap(); - log::info!("{}ECREV,{},{},{},{},{}", xous::BOOKEND_START, maj, min, rev, commit, xous::BOOKEND_END); + log::info!("{}VER.EC,{},{},{},{},{}", xous::BOOKEND_START, maj, min, rev, commit, xous::BOOKEND_END); write!(ret, "EC sw tag: {}.{}.{}+{}", maj, min, rev, commit).unwrap(); } "wf200" => { @@ -33,14 +33,14 @@ impl<'a> ShellCmdApi<'a> for Ver { "soc" => { let (maj, min, rev, extra, gitrev) = env.llio.soc_gitrev().unwrap(); write!(ret, "SoC git rev {}.{}.{}+{}, commit {:x}", maj, min, rev, extra, gitrev).unwrap(); - log::info!("{}SOCREV,{},{},{},{},{}", xous::BOOKEND_START, maj, min, rev, gitrev, xous::BOOKEND_END); + log::info!("{}VER.SOC,{},{},{},{},{}", xous::BOOKEND_START, maj, min, rev, gitrev, xous::BOOKEND_END); } "dna" => { write!(ret, "SoC silicon DNA: 0x{:x}", env.llio.soc_dna().unwrap()).unwrap(); } "xous" => { write!(ret, "Xous version: {}", env.ticktimer.get_version()).unwrap(); - log::info!("{}XOUSREV,{},{}", xous::BOOKEND_START, env.ticktimer.get_version(), xous::BOOKEND_END); + log::info!("{}VER.XOUS,{},{}", xous::BOOKEND_START, env.ticktimer.get_version(), xous::BOOKEND_END); } _ => { write!(ret, "{}", helpstring).unwrap(); diff --git a/services/shellchat/src/cmds/wlan.rs b/services/shellchat/src/cmds/wlan.rs index 1232a8dc9..8c704f58c 100644 --- a/services/shellchat/src/cmds/wlan.rs +++ b/services/shellchat/src/cmds/wlan.rs @@ -151,7 +151,10 @@ impl<'a> ShellCmdApi<'a> for Wlan { } "status" => { let _ = match env.com.wlan_status() { - Ok(msg) => write!(ret, "{:?}", msg), + Ok(msg) => { + log::info!("{}WLAN.STATUS,{:?},{}", xous::BOOKEND_START, std::net::IpAddr::from(msg.ipv4.addr), xous::BOOKEND_END); + write!(ret, "{:?}", msg) + }, Err(e) => write!(ret, "Error: {:?}", e), }; } diff --git a/services/status/src/time.rs b/services/status/src/time.rs index 783f06f06..dca00aa7d 100644 --- a/services/status/src/time.rs +++ b/services/status/src/time.rs @@ -516,6 +516,7 @@ pub fn start_time_ux(sid: xous::SID) { // note that we don't do an "else" here because we also want to catch the case of // a key exists, but nothing was written to it (length of key was 0 or inappropriate) if !tz_set { + log::info!("{}RTC.TZ,{}", xous::BOOKEND_START, xous::BOOKEND_END); let tz = modals.alert_builder(t!("rtc.timezone", xous::LANG)) .field(None, Some(tz_ux_validator)) .build() @@ -536,6 +537,7 @@ pub fn start_time_ux(sid: xous::SID) { } // see if we want to try to use NTP or not + log::info!("{}RTC.NTP,{}", xous::BOOKEND_START, xous::BOOKEND_END); modals.add_list_item(t!("pddb.yes", xous::LANG)).expect("couldn't build radio item list"); modals.add_list_item(t!("pddb.no", xous::LANG)).expect("couldn't build radio item list"); let mut try_ntp = true; @@ -571,10 +573,12 @@ pub fn start_time_ux(sid: xous::SID) { 0, 0, ) ).expect("couldn't set time"); + log::info!("{}RTC.NTPOK,{}", xous::BOOKEND_START, xous::BOOKEND_END); continue; } Err(err) => { log::info!("Err: {:?}", err); + log::info!("{}RTC.NTPFAIL,{}", xous::BOOKEND_START, xous::BOOKEND_END); modals.show_notification(t!("rtc.ntp_fail", xous::LANG), None).expect("couldn't show NTP error"); }, }