mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 23:49:44 +01:00
clean up some extra logging code in the cli (#7709)
I have been recently going through some info logging in the cli and noticed that there is too much info being printed to get a handle on whats going on... This is an attempt to do some minor logging clean up to print out "less stuff", in info logging mode mainly having to do with the prompt... If someone really want to see what is going on they can very easily add it back in without too much trouble.
This commit is contained in:
parent
95cd9dd2b2
commit
5879b0df99
@ -1,6 +1,6 @@
|
||||
use crate::util::report_error;
|
||||
use crate::NushellPrompt;
|
||||
use log::info;
|
||||
use log::trace;
|
||||
use nu_engine::eval_subexpression;
|
||||
use nu_protocol::{
|
||||
engine::{EngineState, Stack, StateWorkingSet},
|
||||
@ -39,7 +39,7 @@ fn get_prompt_string(
|
||||
// Use eval_subexpression to force a redirection of output, so we can use everything in prompt
|
||||
let ret_val =
|
||||
eval_subexpression(engine_state, &mut stack, block, PipelineData::empty());
|
||||
info!(
|
||||
trace!(
|
||||
"get_prompt_string (block) {}:{}:{}",
|
||||
file!(),
|
||||
line!(),
|
||||
@ -59,7 +59,7 @@ fn get_prompt_string(
|
||||
let block = engine_state.get_block(block_id);
|
||||
// Use eval_subexpression to force a redirection of output, so we can use everything in prompt
|
||||
let ret_val = eval_subexpression(engine_state, stack, block, PipelineData::empty());
|
||||
info!(
|
||||
trace!(
|
||||
"get_prompt_string (block) {}:{}:{}",
|
||||
file!(),
|
||||
line!(),
|
||||
@ -148,7 +148,7 @@ pub(crate) fn update_prompt<'prompt>(
|
||||
);
|
||||
|
||||
let ret_val = nu_prompt as &dyn Prompt;
|
||||
info!("update_prompt {}:{}:{}", file!(), line!(), column!());
|
||||
trace!("update_prompt {}:{}:{}", file!(), line!(), column!());
|
||||
|
||||
ret_val
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user