summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-01-31 17:10:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-01-31 17:10:43 +0000
commitb383d383ccbb0ac16daf1c30f1aebd6f6d243f77 (patch)
treeb6a36a97be3806b402119362d0cd3224e3222a2e
parentf0b44ca74f06981b24807e1f6df86d630c29ff03 (diff)
parent743b98e45f0609f07c4dd88c98d398e0deb3f91d (diff)
downloadextras-b383d383ccbb0ac16daf1c30f1aebd6f6d243f77.tar.gz
Merge "Replace use of deprecated function with_min_level" into main
-rw-r--r--profcollectd/libprofcollectd/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/profcollectd/libprofcollectd/lib.rs b/profcollectd/libprofcollectd/lib.rs
index 9923737f..c8e39753 100644
--- a/profcollectd/libprofcollectd/lib.rs
+++ b/profcollectd/libprofcollectd/lib.rs
@@ -126,11 +126,12 @@ pub fn reset() -> Result<()> {
/// Inits logging for Android
pub fn init_logging() {
- let min_log_level = if cfg!(feature = "test") { log::Level::Info } else { log::Level::Error };
+ let max_log_level =
+ if cfg!(feature = "test") { log::LevelFilter::Info } else { log::LevelFilter::Error };
android_logger::init_once(
android_logger::Config::default()
.with_tag("profcollectd")
- .with_min_level(min_log_level)
- .with_log_id(android_logger::LogId::System),
+ .with_max_level(max_log_level)
+ .with_log_buffer(android_logger::LogId::System),
);
}