You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the advice from https://nblumhardt.com/2016/02/serilog-tip-dont-serialize-arbitrary-objects/ , it's quite a common pattern to use anonymous classes as a property to enrich a log event. In those case, it's important to remember to add the @destructuring operator in the message template, or else, the ToString() behavior will be used.
It would be good to detect cases where the user has passed a property of an anonymous type, but forgot to add the @ operator. The code fix would be to add the missing operator in the template.
The text was updated successfully, but these errors were encountered:
Following the advice from https://nblumhardt.com/2016/02/serilog-tip-dont-serialize-arbitrary-objects/ , it's quite a common pattern to use anonymous classes as a property to enrich a log event. In those case, it's important to remember to add the
@
destructuring operator in the message template, or else, theToString()
behavior will be used.It would be good to detect cases where the user has passed a property of an anonymous type, but forgot to add the
@
operator. The code fix would be to add the missing operator in the template.The text was updated successfully, but these errors were encountered: