Make the tracing macros optional.
This commit is contained in:
@@ -18,7 +18,7 @@ use crate::parser::util::get_consumed;
|
||||
use crate::parser::util::start_of_line;
|
||||
use crate::parser::Clock;
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
pub fn clock<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, Clock<'s>> {
|
||||
start_of_line(context, input)?;
|
||||
let (remaining, _leading_whitespace) = space0(input)?;
|
||||
@@ -34,7 +34,7 @@ pub fn clock<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, C
|
||||
Ok((remaining, Clock { source }))
|
||||
}
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
fn inactive_timestamp_range_duration<'r, 's>(
|
||||
context: Context<'r, 's>,
|
||||
input: &'s str,
|
||||
@@ -56,7 +56,7 @@ fn inactive_timestamp_range_duration<'r, 's>(
|
||||
)))(input)
|
||||
}
|
||||
|
||||
#[tracing::instrument(ret, level = "debug")]
|
||||
#[cfg_attr(feature = "tracing", tracing::instrument(ret, level = "debug"))]
|
||||
fn inactive_timestamp<'r, 's>(context: Context<'r, 's>, input: &'s str) -> Res<&'s str, &'s str> {
|
||||
recognize(tuple((
|
||||
tag("["),
|
||||
|
||||
Reference in New Issue
Block a user