-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[LSG] Objects logging using @ operator in logging source generator attribute #78013
Comments
Tagging subscribers to this area: @dotnet/area-extensions-logging Issue DetailsDescriptionHi! Looks like it's impossible to use @ in message template, but it's important for loggers like Serilog, NLog, etc. Reproduction StepsI tried to add this:
and i received this error:
using @request in params doesn't change anything. Expected behaviorOperator @ should be ignored in params names comparison. Actual behaviorError appears. Regression?No response Known WorkaroundsNo response Configuration.NET 7 rc2 Other informationNo response
|
do you have a small sample using serilog with this? |
@maryamariyan Just created https://github.com/vpetrusevici/SerilogSourceGenExample |
You can also see examples for serilog on their page https://serilog.net/ |
Fixed by #79038 |
Is there a plan to backport this to .NET 6. Would be helpful. |
Description
Hi! Looks like it's impossible to use @ in message template, but it's important for loggers like Serilog, NLog, etc.
Reproduction Steps
I tried to add this:
and i received this error:
using @request in params doesn't change anything.
Expected behavior
Operator @ should be ignored in params names comparison.
Actual behavior
Error appears.
Regression?
No response
Known Workarounds
No response
Configuration
.NET 7 rc2
Visual Studio 2022 preview 6.0
Other information
No response
The text was updated successfully, but these errors were encountered: