I'm able to emit events using https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/struct.Layer.html#method.with_span_events, but they are created at TRACE level. Is there any way to cause these to be created at a different level?
Asked
Active
Viewed 33 times
1 Answers
-1
You can create events using the event! macro with the desired level specified, e.g.
event!(Level::ERROR, %error, "Received error");
Or even better you can use the shorthand macros for each level
error!(%error, "Received error");

Michael
- 507
- 4
- 11
-
The event's created by `.with_span_events()` are created within tracing-subscriber itself, not by the user. So this doesn't help. – kmdreko Jun 19 '23 at 18:22