Merge "Replace use of deprecated logging functions" into main
This commit is contained in:
commit
17aa36a60d
4 changed files with 9 additions and 9 deletions
|
@ -21,7 +21,7 @@ use android_hardware_bluetooth_lmp_event::aidl::android::hardware::bluetooth::lm
|
|||
};
|
||||
|
||||
use binder::BinderFeatures;
|
||||
use log::{info, Level};
|
||||
use log::{info, LevelFilter};
|
||||
|
||||
mod lmp_event;
|
||||
|
||||
|
@ -30,7 +30,7 @@ const LOG_TAG: &str = "lmp_event_service_example";
|
|||
fn main() {
|
||||
info!("{LOG_TAG}: starting service");
|
||||
let logger_success = logger::init(
|
||||
logger::Config::default().with_tag_on_device(LOG_TAG).with_min_level(Level::Trace)
|
||||
logger::Config::default().with_tag_on_device(LOG_TAG).with_max_level(LevelFilter::Trace)
|
||||
);
|
||||
if !logger_success {
|
||||
panic!("{LOG_TAG}: Failed to start logger");
|
||||
|
|
|
@ -50,8 +50,8 @@ fn inner_main() -> Result<(), HalServiceError> {
|
|||
android_logger::init_once(
|
||||
android_logger::Config::default()
|
||||
.with_tag("authgraph-hal-nonsecure")
|
||||
.with_min_level(log::Level::Info)
|
||||
.with_log_id(android_logger::LogId::System),
|
||||
.with_max_level(log::LevelFilter::Info)
|
||||
.with_log_buffer(android_logger::LogId::System),
|
||||
);
|
||||
// Redirect panic messages to logcat.
|
||||
std::panic::set_hook(Box::new(|panic_info| {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
//! Non-secure implementation of the Secretkeeper HAL.
|
||||
|
||||
use log::{error, info, Level};
|
||||
use log::{error, info, LevelFilter};
|
||||
use secretkeeper_hal::SecretkeeperService;
|
||||
use secretkeeper_nonsecure::{AuthGraphChannel, SecretkeeperChannel, LocalTa};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -29,8 +29,8 @@ fn main() {
|
|||
android_logger::init_once(
|
||||
android_logger::Config::default()
|
||||
.with_tag("NonSecureSecretkeeper")
|
||||
.with_min_level(Level::Info)
|
||||
.with_log_id(android_logger::LogId::System),
|
||||
.with_max_level(LevelFilter::Info)
|
||||
.with_log_buffer(android_logger::LogId::System),
|
||||
);
|
||||
// Redirect panic messages to logcat.
|
||||
std::panic::set_hook(Box::new(|panic_info| {
|
||||
|
|
|
@ -6,7 +6,7 @@ use tokio::runtime::Runtime;
|
|||
use std::env;
|
||||
use std::panic;
|
||||
|
||||
use log::Level;
|
||||
use log::LevelFilter;
|
||||
|
||||
mod uwb;
|
||||
mod uwb_chip;
|
||||
|
@ -14,7 +14,7 @@ mod uwb_chip;
|
|||
fn main() -> anyhow::Result<()> {
|
||||
logger::init(
|
||||
logger::Config::default()
|
||||
.with_min_level(Level::Debug)
|
||||
.with_max_level(LevelFilter::Debug)
|
||||
.with_tag_on_device("android.hardware.uwb"),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue