This commit is contained in:
Yehuda Katz
2019-07-12 12:22:08 -07:00
parent 2da12aed56
commit 70f9e355fd
13 changed files with 76 additions and 33 deletions

View File

@ -53,15 +53,15 @@ fn trace_step<'a, T: Debug>(
name: &str,
block: impl FnOnce(NomSpan<'a>) -> IResult<NomSpan<'a>, T>,
) -> IResult<NomSpan<'a>, T> {
trace!("+ before {} @ {:?}", name, input);
trace!(target: "nu::lite_parse", "+ before {} @ {:?}", name, input);
match block(input) {
Ok((input, result)) => {
trace!("after {} @ {:?} -> {:?}", name, input, result);
trace!(target: "nu::lite_parse", "after {} @ {:?} -> {:?}", name, input, result);
Ok((input, result))
}
Err(e) => {
trace!("- failed {} :: {:?}", name, e);
trace!(target: "nu::lite_parse", "- failed {} :: {:?}", name, e);
Err(e)
}
}