-
Notifications
You must be signed in to change notification settings - Fork 734
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
Const value as target =
value in instrument
.
#2460
Comments
Currently, the target value is parsed using the tracing/tracing-attributes/src/attr.rs Line 97 in 264a417
This parses the input as a keyword followed by a string literal: tracing/tracing-attributes/src/attr.rs Lines 206 to 216 in 264a417
We could support constants in the attribute if we changed this code to accept a string literal or an identifier. We might want to do the same for other attribute arguments that are currently only able to accept string literals and not constants, besides the target. This is probably a pretty straightforward change, if anyone is interested in submitting a PR. I'm happy to provide some guidance! |
Feature Request
Crates
tracing
Motivation
We keep the set of tracing targets as a list of
const LOG_SMTH : &str = "smth";
to avoid typos.
Proposal
I'd like to:
The text was updated successfully, but these errors were encountered: