pvm_exec: Set up Android logger
I might not had needed it since it's working, but this should have been
done anyway in the first place.
Bug: None
Test: See the log in logcat
Change-Id: Ib9df6356c21264304d16efb25ec917045ebd9237
diff --git a/compos/src/pvm_exec.rs b/compos/src/pvm_exec.rs
index 2218d10..69eebbf 100644
--- a/compos/src/pvm_exec.rs
+++ b/compos/src/pvm_exec.rs
@@ -166,6 +166,12 @@
}
fn main() -> Result<()> {
+ let debuggable = env!("TARGET_BUILD_VARIANT") != "user";
+ let log_level = if debuggable { log::Level::Trace } else { log::Level::Info };
+ android_logger::init_once(
+ android_logger::Config::default().with_tag("pvm_exec").with_min_level(log_level),
+ );
+
// 1. Parse the command line arguments for collect execution data.
let Config { args, metadata, cid, debuggable } = parse_args()?;