From 460d635ed05ca967f5d0453be05a5e76ee647a89 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Wed, 16 Mar 2022 14:58:11 -0500 Subject: [PATCH] update so that `--log-level` will work properly (#4856) --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 92ad27c93..82c4c4339 100644 --- a/src/main.rs +++ b/src/main.rs @@ -136,9 +136,11 @@ fn main() -> Result<()> { set_is_perf_value(binary_args.perf); - if binary_args.perf { - // if we started in perf mode show only the info logs - // TODO: what happens when the config log_level is read? + if binary_args.perf || binary_args.log_level.is_some() { + // since we're in this section, either perf is true or log_level has been set + // if log_level is set, just use it + // otherwise if perf is true, set the log_level to `info` which is what + // the perf calls are set to. let level = binary_args .log_level .map(|level| level.item)