Customize entities rendering
HowTo: Customize entities rendering on diginsight log streams
Diginsight provides automatic rendering for entities such as method input payloads or return values.
Entities rendering is performed automatically for simple types and also for complex types with fields and properties.
This article discusses how rendering is handled ensuring limited performance impact and how the developer can customize rendering for its own entities or for entities from other packages.
Additional Information
For simple types rendering is performed in automatic and intuitive way. the image below shows log for DoSomeWork, StepOne and StepTwo methods that return integer values.
For complex types, by default, entities are rendered with their property values in the order chosen by the compiler.
Customize properties rendering
The developer can use attributes LogStringableMember
NonLogStringableMember
to decide members to be shown with a specific order and members to be excluded from rendering. The image below shows a custom entity where order is defined for members and where non relevant members are excluded by means of the NonLogStringableMember
attribute:
Customize the full entities rendering
TODO: In Progress