Skip to content
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

Don't go through Display for &str tracing fields #163

Merged
merged 1 commit into from
Dec 27, 2024
Merged

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Dec 27, 2024

The extra % was piping the values through tracing::field::display, which makes little sense for &strs, and would lead to quotes being omitted in places where they would be helpful (for example tracing_subscribers fmt::Subscriber).

@jplatte jplatte requested a review from JakkuSakura December 27, 2024 16:46
@jplatte jplatte merged commit 82e90fe into master Dec 27, 2024
1 check passed
@jplatte jplatte deleted the jplatte/tracing branch December 27, 2024 19:10
@tamasfe
Copy link
Owner

tamasfe commented Dec 28, 2024

Not specifying the value will just reserve empty fields for them, so it should be path = path in the macro to actually use the values. It's a footgun with tracing's current defaults.

@jplatte
Copy link
Collaborator Author

jplatte commented Dec 28, 2024

I thought I used this style successfully before. I'll test it later.

@jplatte
Copy link
Collaborator Author

jplatte commented Dec 28, 2024

Dang, you're right. I will send a PR to fix it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants