profcollectd: Log to System rather than Main
This allows logging early in the boot sequence.
Test: presubmit
Bug: 215419883
Change-Id: I276c3becfbba00d39402d5bdd14492532eb95cf7
diff --git a/profcollectd/libprofcollectd/lib.rs b/profcollectd/libprofcollectd/lib.rs
index f95132f..da178f2 100644
--- a/profcollectd/libprofcollectd/lib.rs
+++ b/profcollectd/libprofcollectd/lib.rs
@@ -127,6 +127,9 @@
pub fn init_logging() {
let min_log_level = if cfg!(feature = "test") { log::Level::Info } else { log::Level::Error };
android_logger::init_once(
- android_logger::Config::default().with_tag("profcollectd").with_min_level(min_log_level),
+ android_logger::Config::default()
+ .with_tag("profcollectd")
+ .with_min_level(min_log_level)
+ .with_log_id(android_logger::LogId::System),
);
}