Merge "Replace use of deprecated logging functions" into main
This commit is contained in:
commit
2730678378
2 changed files with 6 additions and 4 deletions
|
@ -40,8 +40,8 @@ fn main() {
|
||||||
android_logger::init_once(
|
android_logger::init_once(
|
||||||
android_logger::Config::default()
|
android_logger::Config::default()
|
||||||
.with_tag("keystore2")
|
.with_tag("keystore2")
|
||||||
.with_min_level(log::Level::Debug)
|
.with_max_level(log::LevelFilter::Debug)
|
||||||
.with_log_id(android_logger::LogId::System)
|
.with_log_buffer(android_logger::LogId::System)
|
||||||
.format(|buf, record| {
|
.format(|buf, record| {
|
||||||
writeln!(
|
writeln!(
|
||||||
buf,
|
buf,
|
||||||
|
|
|
@ -31,7 +31,7 @@ use std::{
|
||||||
|
|
||||||
use anyhow::{ensure, Context, Result};
|
use anyhow::{ensure, Context, Result};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use log::{error, info, Level};
|
use log::{error, info, LevelFilter};
|
||||||
use nix::sys::signal;
|
use nix::sys::signal;
|
||||||
use tokio::{io::AsyncWriteExt, net::UnixListener as TokioUnixListener};
|
use tokio::{io::AsyncWriteExt, net::UnixListener as TokioUnixListener};
|
||||||
|
|
||||||
|
@ -48,7 +48,9 @@ struct Cli {
|
||||||
fn configure_logging() -> Result<()> {
|
fn configure_logging() -> Result<()> {
|
||||||
ensure!(
|
ensure!(
|
||||||
logger::init(
|
logger::init(
|
||||||
logger::Config::default().with_tag_on_device("prng_seeder").with_min_level(Level::Info)
|
logger::Config::default()
|
||||||
|
.with_tag_on_device("prng_seeder")
|
||||||
|
.with_max_level(LevelFilter::Info)
|
||||||
),
|
),
|
||||||
"log configuration failed"
|
"log configuration failed"
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue