mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
update so that --log-level
will work properly (#4856)
This commit is contained in:
parent
1a16b9a2c4
commit
460d635ed0
@ -136,9 +136,11 @@ fn main() -> Result<()> {
|
|||||||
|
|
||||||
set_is_perf_value(binary_args.perf);
|
set_is_perf_value(binary_args.perf);
|
||||||
|
|
||||||
if binary_args.perf {
|
if binary_args.perf || binary_args.log_level.is_some() {
|
||||||
// if we started in perf mode show only the info logs
|
// since we're in this section, either perf is true or log_level has been set
|
||||||
// TODO: what happens when the config log_level is read?
|
// 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
|
let level = binary_args
|
||||||
.log_level
|
.log_level
|
||||||
.map(|level| level.item)
|
.map(|level| level.item)
|
||||||
|
Loading…
Reference in New Issue
Block a user