<PackageReference Include="Serilog.Exceptions" Version="8.1.0" />

Serilog.Exceptions.Destructurers.ReflectionBasedDestructurer

Destructures exceptions by gathering all public non-indexer properties using reflection and then dynamically retrieving their values. This class can handle every exception including those with circular references and throwing properties. Additionally, a "Type" property is added to let the user know exact type of destructured exception.
namespace Serilog.Exceptions.Destructurers { public class ReflectionBasedDestructurer : IExceptionDestructurer { public Type[] TargetTypes { get; } public ReflectionBasedDestructurer(int destructuringDepth); public void Destructure(Exception exception, IExceptionPropertiesBag propertiesBag, Func<Exception, IReadOnlyDictionary<string, object>> destructureException); } }