logcall
An attribute macro that logs the return value from function call.
This is a reimplementation of the log-derive crate with async-trait compatibility.
Usage
use logcall;
// prints:
// [2023-07-21T12:57:43Z INFO main] foo() => 2
An attribute macro that logs the return value from function call.
This is a reimplementation of the log-derive crate with async-trait compatibility.
use logcall::logcall;
#[logcall("info")]
fn foo(a: usize) -> usize {
a + 1
}
fn main() {
env_logger::builder().filter_level(log::LevelFilter::Info).init();
foo(1);
}
// prints:
// [2023-07-21T12:57:43Z INFO main] foo() => 2