Serilog.Tests.LoggerConfigurationTests.ExceptionsThrownByDestructuringPoliciesArePropagatedIfAuditingEnabled C# (CSharp) Метод

ExceptionsThrownByDestructuringPoliciesArePropagatedIfAuditingEnabled() приватный Метод

        public void ExceptionsThrownByDestructuringPoliciesArePropagatedIfAuditingEnabled()
        {
            var logger = new LoggerConfiguration()
                .AuditTo.Sink(new CollectingSink())
                .Destructure.ByTransforming<Value>(v => { throw new Exception("Boom!"); })
                .CreateLogger();

            Assert.Throws<Exception>(() => logger.Information("{@Value}", new Value()));
        }