use tracing::debug;
fn function1(x: u8, y: u8) -> u8{
debug!("Entered function1");
let z = x + y;
z
}
I'd like to add a debug (or perhaps equivalent thing with trace!(..)
) at the start of every function, to make it easier to debug. But I think the extra debug macro will make it more noisy to follow the logic inside the function body, and the syntax itself seems more verbose than it needs to be, so I'd prefer to do this as an attribute instead, like this:
use tracing_attributes::debug;
#[debug]
fn function1(x: u8, y: u8) -> u8{
let z = x + y;
z
}
Is there a crate that offers this kind of attribute?