summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-12-23 11:09:12 +0200
committerLars Wirzenius <liw@liw.fi>2023-12-23 11:09:12 +0200
commit1eaf96f5184355a0c6ef69c225fb8d33b23a2d6a (patch)
tree55bcfb989c0ccb692e7c0372a3001cf5d9841867
parente50a3197fd4b126941a3eafde74e675d41be3806 (diff)
downloadambient-driver-ambient-boot.tar.gz
feat: reduce log spam by logging at trace level, not infoambient-boot
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--src/qemu.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qemu.rs b/src/qemu.rs
index 5727ddd..79425c6 100644
--- a/src/qemu.rs
+++ b/src/qemu.rs
@@ -227,14 +227,15 @@ impl Qemu {
fn exit_code(log: &str) -> Result<i32, QemuError> {
const EXIT: &str = "\nEXIT CODE: ";
if let Some((_, rest)) = log.split_once(EXIT) {
- info!("log has {:?}", EXIT);
+ trace!("log has {:?}", EXIT);
if let Some((exit, _)) = rest.split_once('\n') {
- info!("log has newline after exit: {:?}", exit);
- if let Ok(exit) = exit.trim().parse::<i32>() {
- info!("log exit coded parses ok: {}", exit);
+ let exit = exit.trim();
+ trace!("log has newline after exit: {:?}", exit);
+ if let Ok(exit) = exit.parse::<i32>() {
+ trace!("log exit coded parses ok: {}", exit);
return Ok(exit);
}
- info!("log exit does not parse");
+ debug!("log exit does not parse");
}
}
Err(QemuError::NoExit)