summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2022-02-23 15:01:10 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-02-23 15:01:10 +0000
commit920c8466f50177da51e9fe27dc1f09d021e951e0 (patch)
treef63c882c733223a7d38fd0312fdb8b396b53b530
parent8be7fb4133f02372a2e37de1a1535ee15648c91f (diff)
parentd1cca10c23e9e5c43f79fb63e66524a12e7a3241 (diff)
downloadextras-920c8466f50177da51e9fe27dc1f09d021e951e0.tar.gz
Merge "profcollectd: Log to System rather than Main"
-rw-r--r--profcollectd/libprofcollectd/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/profcollectd/libprofcollectd/lib.rs b/profcollectd/libprofcollectd/lib.rs
index f95132f4..da178f27 100644
--- a/profcollectd/libprofcollectd/lib.rs
+++ b/profcollectd/libprofcollectd/lib.rs
@@ -127,6 +127,9 @@ pub fn reset() -> Result<()> {
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),
);
}