Introduce 'compact' trace level verbosity

For now, it only shows the span start. We'll change that in the next commit to show a line number and a column.
This commit is contained in:
KtorZ
2024-01-18 11:43:07 +01:00
parent 627c6b576e
commit e67d5863a1
6 changed files with 251 additions and 201 deletions

View File

@@ -86,8 +86,9 @@ pub fn keep_traces_parser(
#[allow(clippy::type_complexity)]
pub fn trace_level_parser() -> MapValueParser<PossibleValuesParser, fn(String) -> TraceLevel> {
PossibleValuesParser::new(["silent", "verbose"]).map(|s| match s.as_str() {
PossibleValuesParser::new(["silent", "compact", "verbose"]).map(|s| match s.as_str() {
"silent" => TraceLevel::Silent,
"compact" => TraceLevel::Compact,
"verbose" => TraceLevel::Verbose,
_ => unreachable!(),
})