Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
Signed-off-by: Ziy1-Tan <[email protected]>
  • Loading branch information
Ziy1-Tan committed Sep 12, 2024
1 parent f17e8cb commit 101e0e6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vmm/task/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ limitations under the License.

use std::{collections::HashMap, convert::TryFrom, path::Path, process::exit, sync::Arc};

use anyhow::anyhow;
use containerd_shim::{
asynchronous::{monitor::monitor_notify_by_pid, util::asyncify},
error::Error,
Expand Down Expand Up @@ -187,8 +188,12 @@ fn init_logger(log_level: &str, enable_tracing: bool) -> anyhow::Result<()> {
}

let subscriber = Registry::default().with(env_filter).with(layers);
tracing::subscriber::set_global_default(subscriber).expect("unable to set global subscriber");

match tracing::subscriber::set_global_default(subscriber) {
Ok(_) => {}
Err(e) => {
return Err(anyhow!("failed to set global default subscriber: {}", e));
}
}
Ok(())
}

Expand Down

0 comments on commit 101e0e6

Please sign in to comment.