-
Notifications
You must be signed in to change notification settings - Fork 741
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
Improve [TagName] support in [LoggerMessage] source-gen #4848
Labels
Comments
geeknoid
pushed a commit
that referenced
this issue
Jan 3, 2024
- When using [TagName] to control the name of a logging tag, the expectation is that the logging message (if present) should be using the tag name instead of the parameter name. SO: ``` [LoggerMessage(1, LogLevel.Information, "My message {foo.bar}")] public static partial void Log(this ILogger logger, [TagName("foo.bar") string msg); ``` Fixes #4848
ghost
added
the
work in progress 🚧
label
Jan 3, 2024
xakep139
changed the title
Improve [TagNames] support in [LoggerMessage] source-gen
Improve [TagName] support in [LoggerMessage] source-gen
Jan 3, 2024
geeknoid
pushed a commit
that referenced
this issue
Jan 3, 2024
- When using [TagName] to control the name of a logging tag, the expectation is that the logging message (if present) should be using the tag name instead of the parameter name. SO: ``` [LoggerMessage(1, LogLevel.Information, "My message {foo.bar}")] public static partial void Log(this ILogger logger, [TagName("foo.bar") string msg); ``` Fixes #4848
geeknoid
added a commit
that referenced
this issue
Jan 3, 2024
- When using [TagName] to control the name of a logging tag, the expectation is that the logging message (if present) should be using the tag name instead of the parameter name. SO: ``` [LoggerMessage(1, LogLevel.Information, "My message {foo.bar}")] public static partial void Log(this ILogger logger, [TagName("foo.bar") string msg); ``` Fixes #4848 Co-authored-by: Martin Taillefer <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, the
[TagName]
behavior doesn't allow specifying non-alphanumeric names in a message format string:The text was updated successfully, but these errors were encountered: