tracing_capture_event_fields!
macroThis macro runs a given block of code, and returns only the Field/Value tuples emitted per Event.
It's a quick way to inspect the custom data your events carry.
Example usage: ```rust use tracingassertmacros::tracingcaptureevent_fields; use tracing;
// Given
fn methodundertest() {
tracing::trace!(message = "something important!");
tracing::trace!(message = "something else important!");
}
let expected_events: Vec // When capturing the event field/values into the // Then
asserteq!(events, expectedevents);
```events
variable
let events = tracingcaptureeventfields!({
methodunder_test();
});