Closed fagnercarvalho closed 4 years ago
Thanks for the suggestion! A bit has been written on this already; unfortunately the design of string interpolation in C# makes it hard to do this well. I think this article and the comments capture the main issues/thinking: https://nblumhardt.com/2015/01/c-6-string-interpolation-and-serilog/
It seems like I'm late to the party.
I thought this "new" C# feature could be used in this context but you made some excellent points in your article.
I'm closing this issue.
Thank you for your fast response!
It would be nice to support string interpolation so instead of doing this:
We could just do this:
Just to clarify, both of these include the log but only the first one adds the
response
variable as a log property.