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
This commit is contained in:
parent
5817c77734
commit
4a65459145
|
@ -7,6 +7,7 @@ rust_binary {
|
|||
srcs: ["src/pvm_exec.rs"],
|
||||
rustlibs: [
|
||||
"compos_aidl_interface-rust",
|
||||
"libandroid_logger",
|
||||
"libanyhow",
|
||||
"libbinder_rpc_unstable_bindgen",
|
||||
"libbinder_rs",
|
||||
|
|
|
@ -166,6 +166,12 @@ fn parse_args() -> Result<Config> {
|
|||
}
|
||||
|
||||
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()?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue