-
Notifications
You must be signed in to change notification settings - Fork 846
Closed
Labels
crate/attributesRelated to the `tracing-attributes` crateRelated to the `tracing-attributes` cratekind/featureNew feature or requestNew feature or request
Description
Feature Request
Crates
tracing-attributes
Motivation
Tracing's #[instrument] is very nice for printf-style debugging as well as post-hoc analysis. But as far as I can tell it does not print the return value of the annotated function (although you can use err to print the Err of a Result).
Proposal
I suggest #[instrument(return)] to make it print the return value on function exit.
Alternatives
Adding a dbg! call to the call sites seems the most obvious workaround but is far less convenient.
Aaron1011, ciuncan and hkmatsumoto
Metadata
Metadata
Assignees
Labels
crate/attributesRelated to the `tracing-attributes` crateRelated to the `tracing-attributes` cratekind/featureNew feature or requestNew feature or request