Closed Michael-Lfx closed 5 years ago
Hmm, do you mean a function that returns a tuple?
Because your example returns nothing, and right now there's no support to logging the inputs of a function, only the outputs. (although I want to add, just need to decide if it should be in a separate macro or not)
Thank you for reply so quickly. I want to log function call with all its parameters not only parameter name but also actual parameter value.
I don't really understand exactly do you want, right now the macro let's you log only the output of a function, are you looking for input value support? e.g.
#[logfn(DEBUG)]
fn foo(a: A, b: B) -> C {
return C;
}
This will log only C, not a or b. I think what you're looking for is to log a and b, right? (maybe the fibonacci example was a bit confusing)
I think what you're looking for is to log a and b, right?
Yes. To log function name and its parameters with their runtime value also.
Ok, yeah I plan to implement this in the next few days. I mostly need to decide if this should be in the same macro or different one
For anyone interested that's done :) I'll publish a new version today.
Nice work! Is that any plan to support multiple arguments output? Here is a failed test.