commit | d9dda0c19c2d4166f147ed988cf589c533173795 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Wed Feb 07 14:27:06 2024 +0100 |
committer | Jeff Vander Stoep <jeffv@google.com> | Wed Feb 07 14:27:51 2024 +0100 |
tree | 4db937773e32c46b36e6b39f50a0b084dac1e8e6 | |
parent | c91541a03e8fcc8b20e4ad77ee41f3e54fa52f77 [diff] [blame] |
Replace use of deprecated logging functions This is needed to upgrade the android_logger crate from 0.12.0 to 0.13.3. with_max_level provides the same functionality as with_min_level. The renaming is admittedly confusing, but the new name is accurate and it makes sense that they deprecated and then removed the previously poorly named with_min_level. See crate documentation [1] and code [2]. [1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level [2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227 Bug: 322718401 Test: build and run CF with the change. Test: m aosp_cf_x86_64_phone Change-Id: I81bcd468e8e5fa8a4686642cb32758b74d271503
diff --git a/vmbase/example/tests/test.rs b/vmbase/example/tests/test.rs index 17ff947..2df5a80 100644 --- a/vmbase/example/tests/test.rs +++ b/vmbase/example/tests/test.rs
@@ -42,7 +42,9 @@ #[test] fn test_run_example_vm() -> Result<(), Error> { android_logger::init_once( - android_logger::Config::default().with_tag("vmbase").with_min_level(log::Level::Debug), + android_logger::Config::default() + .with_tag("vmbase") + .with_max_level(log::LevelFilter::Debug), ); // Redirect panic messages to logcat.