Skip to content

Commit 7e19fdc

Browse files
committed
Logging: Default to Warn and removed timestamps from log
1 parent 6d936b1 commit 7e19fdc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bin/uhyve.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use std::{iter, num::ParseIntError, ops::RangeInclusive, path::PathBuf, process,
55
use clap::{error::ErrorKind, Command, CommandFactory, Parser};
66
use core_affinity::CoreId;
77
use either::Either;
8+
use env_logger::Builder;
9+
use log::LevelFilter;
810
use thiserror::Error;
911
use uhyvelib::{
1012
params::{CpuCount, GuestMemorySize, Output, Params},
@@ -304,7 +306,11 @@ fn run_uhyve() -> i32 {
304306
#[cfg(feature = "instrument")]
305307
setup_trace();
306308

307-
env_logger::init();
309+
let mut env_builder = Builder::new();
310+
env_builder.filter_level(LevelFilter::Warn);
311+
env_builder.parse_env("RUST_LOG");
312+
env_builder.format_timestamp(None);
313+
env_builder.init();
308314

309315
let mut app = Args::command();
310316
let args = Args::parse();

0 commit comments

Comments
 (0)