1

It seems that the serilog cannot deconstruct classes (contracts messages) automatically generated by Visual Studio when a service reference is added.

They are always serialized with unknow _typetag

 "fields": {
   "Request": {
     "_typeTag": "MessageContractType"
    }
  }

Why it is not automatically deconstructed?

1 Answers1

2

This is because the generated types have public fields, while Serilog's destructuring only inspects properties. A custom IDestructuringPolicy can achieve this.

Nicholas Blumhardt
  • 30,271
  • 4
  • 90
  • 101