-
Notifications
You must be signed in to change notification settings - Fork 791
event!(name: ...) is ignored in "full" and "json" output #2774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is probably because because the tracing::info!("yak shaving started"); the But when using spans, the user has to specify the name, so it's more important (and when do spans get printed using the fmt layer?).
I agree, I think this would be a good addition. |
The |
Add |
Yes, I agree.
Hmm, I don't know about this one to be honest. How would we check if it's the default one or a custom provided one? edit: @hawkw @davidbarsky what do you think? |
Bug Report
Version
Platform
Linux comp 5.10.0-0.deb9.24-amd64 #1 SMP Debian 5.10.179-5~deb9u1 (2023-09-01) x86_64 GNU/Linux
Crates
tracing, tracing-subscriber
Description
Name in
event!(name: ..., ...)
is ignored in both "json" and "full" output intracing-subscriber
.tracing-subscriber
description for "json" output reads: "This is intended for production use" ( https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/format/index.html ). So, I'm assuming that output should be complete or at least can be configured to be complete. Same for "full". Word "full" assumes that output will be full or at least can be configured to be full. Yet in both outputs name is absent. Here is my code:Here is output ("full" mode):
Here is output if I uncomment
.json()
:So, in both cases name is absent. Moreover, when I search (using Ctrl-F) word "name" in https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/struct.Layer.html , I find nothing. Same for https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/format/struct.Json.html and https://docs.rs/tracing-subscriber/0.3.17/tracing_subscriber/fmt/format/struct.Full.html . So, nothing suggests I can somehow configure this.
This is inconsistent, because span names are printed by default. But event's - no. Why you added names at all? They should behave similar to span's names
The text was updated successfully, but these errors were encountered: