Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: RehanSaeed/Serilog.Exceptions
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8.0.0
Choose a base ref
...
head repository: RehanSaeed/Serilog.Exceptions
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8.1.0
Choose a head ref

Commits on Nov 11, 2021

  1. Bump Microsoft.SourceLink.GitHub from 1.1.0 to 1.1.1

    Bumps [Microsoft.SourceLink.GitHub](https://github.com/dotnet/sourcelink) from 1.1.0 to 1.1.1.
    - [Release notes](https://github.com/dotnet/sourcelink/releases)
    - [Commits](dotnet/sourcelink@1.1.0...1.1.1)
    
    ---
    updated-dependencies:
    - dependency-name: Microsoft.SourceLink.GitHub
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Nov 11, 2021
    Copy the full SHA
    de17938 View commit details

Commits on Nov 19, 2021

  1. Bump Microsoft.Data.SqlClient from 3.0.0 to 4.0.0

    Bumps [Microsoft.Data.SqlClient](https://github.com/dotnet/sqlclient) from 3.0.0 to 4.0.0.
    - [Release notes](https://github.com/dotnet/sqlclient/releases)
    - [Changelog](https://github.com/dotnet/SqlClient/blob/main/CHANGELOG.md)
    - [Commits](dotnet/SqlClient@v3.0.0...v4.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: Microsoft.Data.SqlClient
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Nov 19, 2021
    Copy the full SHA
    f392419 View commit details

Commits on Nov 22, 2021

  1. Copy the full SHA
    c76fc42 View commit details
  2. Copy the full SHA
    9118b52 View commit details

Commits on Nov 25, 2021

  1. Bump actions/setup-dotnet from 1.8.2 to 1.9.0

    Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 1.8.2 to 1.9.0.
    - [Release notes](https://github.com/actions/setup-dotnet/releases)
    - [Commits](actions/setup-dotnet@v1.8.2...v1.9.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-dotnet
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Nov 25, 2021
    Copy the full SHA
    08447ef View commit details
  2. Simplify setup-dotnet

    RehanSaeed committed Nov 25, 2021
    Copy the full SHA
    319317e View commit details

Commits on Nov 30, 2021

  1. Copy the full SHA
    1869559 View commit details

Commits on Dec 7, 2021

  1. Update README.md

    RehanSaeed committed Dec 7, 2021
    Copy the full SHA
    15a888e View commit details

Commits on Dec 8, 2021

  1. Bump actions/upload-artifact from 2.2.4 to 2.3.0

    Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.4 to 2.3.0.
    - [Release notes](https://github.com/actions/upload-artifact/releases)
    - [Commits](actions/upload-artifact@v2.2.4...v2.3.0)
    
    ---
    updated-dependencies:
    - dependency-name: actions/upload-artifact
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Dec 8, 2021
    Copy the full SHA
    ef34ba4 View commit details
  2. Copy the full SHA
    d1307c7 View commit details

Commits on Dec 16, 2021

  1. Bump actions/upload-artifact from 2.3.0 to 2.3.1

    Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.3.0 to 2.3.1.
    - [Release notes](https://github.com/actions/upload-artifact/releases)
    - [Commits](actions/upload-artifact@v2.3.0...v2.3.1)
    
    ---
    updated-dependencies:
    - dependency-name: actions/upload-artifact
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Dec 16, 2021
    Copy the full SHA
    ba75f1a View commit details

Commits on Jan 5, 2022

  1. Bump FluentAssertions from 6.2.0 to 6.3.0

    Bumps [FluentAssertions](https://github.com/fluentassertions/fluentassertions) from 6.2.0 to 6.3.0.
    - [Release notes](https://github.com/fluentassertions/fluentassertions/releases)
    - [Changelog](https://github.com/fluentassertions/fluentassertions/blob/master/AcceptApiChanges.ps1)
    - [Commits](fluentassertions/fluentassertions@6.2.0...6.3.0)
    
    ---
    updated-dependencies:
    - dependency-name: FluentAssertions
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Jan 5, 2022
    Copy the full SHA
    6d36cc9 View commit details

Commits on Jan 13, 2022

  1. Copy the full SHA
    7162409 View commit details

Commits on Jan 19, 2022

  1. Bump release-drafter/release-drafter from 5.16.1 to 5.17.5

    Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.16.1 to 5.17.5.
    - [Release notes](https://github.com/release-drafter/release-drafter/releases)
    - [Commits](release-drafter/release-drafter@v5.16.1...v5.17.5)
    
    ---
    updated-dependencies:
    - dependency-name: release-drafter/release-drafter
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Jan 19, 2022
    Copy the full SHA
    f8412b3 View commit details

Commits on Jan 21, 2022

  1. Bump release-drafter/release-drafter from 5.17.5 to 5.17.6

    Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.17.5 to 5.17.6.
    - [Release notes](https://github.com/release-drafter/release-drafter/releases)
    - [Commits](release-drafter/release-drafter@v5.17.5...v5.17.6)
    
    ---
    updated-dependencies:
    - dependency-name: release-drafter/release-drafter
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Jan 21, 2022
    Copy the full SHA
    7936407 View commit details

Commits on Jan 25, 2022

  1. Bump FluentAssertions from 6.3.0 to 6.4.0

    Bumps [FluentAssertions](https://github.com/fluentassertions/fluentassertions) from 6.3.0 to 6.4.0.
    - [Release notes](https://github.com/fluentassertions/fluentassertions/releases)
    - [Changelog](https://github.com/fluentassertions/fluentassertions/blob/master/AcceptApiChanges.ps1)
    - [Commits](fluentassertions/fluentassertions@6.3.0...6.4.0)
    
    ---
    updated-dependencies:
    - dependency-name: FluentAssertions
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Jan 25, 2022
    Copy the full SHA
    139e12c View commit details

Commits on Jan 28, 2022

  1. Bump Refit from 6.0.15 to 6.2.16

    Bumps [Refit](https://github.com/reactiveui/refit) from 6.0.15 to 6.2.16.
    - [Release notes](https://github.com/reactiveui/refit/releases)
    - [Commits](reactiveui/refit@v6.0.15...v6.2.16)
    
    ---
    updated-dependencies:
    - dependency-name: Refit
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Jan 28, 2022
    Copy the full SHA
    17b3cd9 View commit details

Commits on Jan 31, 2022

  1. Bump coverlet.collector from 3.1.0 to 3.1.1

    Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 3.1.0 to 3.1.1.
    - [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
    - [Commits](https://github.com/coverlet-coverage/coverlet/commits)
    
    ---
    updated-dependencies:
    - dependency-name: coverlet.collector
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Jan 31, 2022
    Copy the full SHA
    627efee View commit details

Commits on Feb 4, 2022

  1. Bump release-drafter/release-drafter from 5.17.6 to 5.18.0

    Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.17.6 to 5.18.0.
    - [Release notes](https://github.com/release-drafter/release-drafter/releases)
    - [Commits](release-drafter/release-drafter@v5.17.6...v5.18.0)
    
    ---
    updated-dependencies:
    - dependency-name: release-drafter/release-drafter
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Feb 4, 2022
    Copy the full SHA
    7cec718 View commit details

Commits on Feb 9, 2022

  1. Bump release-drafter/release-drafter from 5.18.0 to 5.18.1

    Bumps [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) from 5.18.0 to 5.18.1.
    - [Release notes](https://github.com/release-drafter/release-drafter/releases)
    - [Commits](release-drafter/release-drafter@v5.18.0...v5.18.1)
    
    ---
    updated-dependencies:
    - dependency-name: release-drafter/release-drafter
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Feb 9, 2022
    Copy the full SHA
    fa48bfa View commit details
  2. Bump coverlet.collector from 3.1.1 to 3.1.2

    Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 3.1.1 to 3.1.2.
    - [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
    - [Commits](https://github.com/coverlet-coverage/coverlet/commits)
    
    ---
    updated-dependencies:
    - dependency-name: coverlet.collector
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Feb 9, 2022
    Copy the full SHA
    957571f View commit details
  3. Copy the full SHA
    4e5af93 View commit details
  4. Bump Refit from 6.2.16 to 6.3.2

    Bumps [Refit](https://github.com/reactiveui/refit) from 6.2.16 to 6.3.2.
    - [Release notes](https://github.com/reactiveui/refit/releases)
    - [Commits](reactiveui/refit@v6.2.16...v6.3.2)
    
    ---
    updated-dependencies:
    - dependency-name: Refit
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Feb 9, 2022
    Copy the full SHA
    67764fd View commit details

Commits on Feb 19, 2022

  1. Bump FluentAssertions from 6.4.0 to 6.5.1

    Bumps [FluentAssertions](https://github.com/fluentassertions/fluentassertions) from 6.4.0 to 6.5.1.
    - [Release notes](https://github.com/fluentassertions/fluentassertions/releases)
    - [Changelog](https://github.com/fluentassertions/fluentassertions/blob/develop/AcceptApiChanges.ps1)
    - [Commits](fluentassertions/fluentassertions@6.4.0...6.5.1)
    
    ---
    updated-dependencies:
    - dependency-name: FluentAssertions
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Feb 19, 2022
    Copy the full SHA
    0ecfd29 View commit details
  2. Bump Microsoft.CodeCoverage from 17.0.0 to 17.1.0

    Bumps [Microsoft.CodeCoverage](https://github.com/microsoft/vstest) from 17.0.0 to 17.1.0.
    - [Release notes](https://github.com/microsoft/vstest/releases)
    - [Commits](microsoft/vstest@v17.0.0...v17.1.0)
    
    ---
    updated-dependencies:
    - dependency-name: Microsoft.CodeCoverage
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Feb 19, 2022
    Copy the full SHA
    0249a25 View commit details
  3. Bump Microsoft.VisualStudio.Threading.Analyzers from 17.0.64 to 17.1.46

    Bumps [Microsoft.VisualStudio.Threading.Analyzers](https://github.com/microsoft/vs-threading) from 17.0.64 to 17.1.46.
    - [Release notes](https://github.com/microsoft/vs-threading/releases)
    - [Commits](https://github.com/microsoft/vs-threading/commits)
    
    ---
    updated-dependencies:
    - dependency-name: Microsoft.VisualStudio.Threading.Analyzers
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Feb 19, 2022
    Copy the full SHA
    e5c880c View commit details
  4. Bump Microsoft.NET.Test.Sdk from 17.0.0 to 17.1.0

    Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.0.0 to 17.1.0.
    - [Release notes](https://github.com/microsoft/vstest/releases)
    - [Commits](microsoft/vstest@v17.0.0...v17.1.0)
    
    ---
    updated-dependencies:
    - dependency-name: Microsoft.NET.Test.Sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and RehanSaeed committed Feb 19, 2022
    Copy the full SHA
    c9f1374 View commit details
  5. Copy the full SHA
    578cb79 View commit details
20 changes: 9 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -33,16 +33,14 @@ jobs:
with:
lfs: true
fetch-depth: 0
- name: "Install .NET Core 3.1 SDK"
uses: actions/setup-dotnet@v1.8.2
- name: "Install .NET SDK 3.1 & 5.0"
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: "3.1.x"
- name: "Install .NET Core 5.0 SDK"
uses: actions/setup-dotnet@v1.8.2
with:
dotnet-version: "5.0.x"
dotnet-version: |
3.1.x
5.0.x
- name: "Install .NET Core SDK"
uses: actions/setup-dotnet@v1.8.2
uses: actions/setup-dotnet@v1.9.0
- name: "Dotnet Tool Restore"
run: dotnet tool restore
shell: pwsh
@@ -56,7 +54,7 @@ jobs:
run: dotnet cake --target=Pack
shell: pwsh
- name: "Publish Artefacts"
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v2.3.1
with:
name: ${{matrix.os}}
path: "./Artefacts"
@@ -73,7 +71,7 @@ jobs:
runs-on: windows-latest
steps:
- name: "Download Artefact"
uses: actions/download-artifact@v2
uses: actions/download-artifact@v2.1.0
with:
name: "windows-latest"
- name: "Dotnet NuGet Add Source"
@@ -93,7 +91,7 @@ jobs:
runs-on: windows-latest
steps:
- name: "Download Artefact"
uses: actions/download-artifact@v2
uses: actions/download-artifact@v2.1.0
with:
name: "windows-latest"
- name: "Dotnet NuGet Push"
9 changes: 8 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,12 @@ on:
push:
branches:
- main
pull_request_target:
types:
- edited
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
@@ -13,6 +19,7 @@ jobs:
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- name: "Draft Release"
uses: release-drafter/release-drafter@v5.18.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@

<ItemGroup Label="Package References">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" PrivateAssets="All" Version="17.0.64" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" PrivateAssets="All" Version="17.1.46" />
<PackageReference Include="MinVer" PrivateAssets="All" Version="2.5.0" />
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" Version="1.2.0-beta.354" />
</ItemGroup>
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Serilog.Exceptions Banner](https://media.githubusercontent.com/media/RehanSaeed/Serilog.Exceptions/main/Images/Banner.png)
![Serilog.Exceptions Banner](https://github.com/RehanSaeed/Serilog.Exceptions/blob/main/Images/Banner.png)

[![Serilog.Exceptions NuGet Package](https://img.shields.io/nuget/v/Serilog.Exceptions.svg)](https://www.nuget.org/packages/Serilog.Exceptions/) [![Serilog.Exceptions package in serilog-exceptions feed in Azure Artifacts](https://feeds.dev.azure.com/serilog-exceptions/_apis/public/Packaging/Feeds/8479813c-da6b-4677-b40d-78df8725dc9c/Packages/212043f6-5fe5-4c79-949e-162156b89894/Badge)](https://dev.azure.com/serilog-exceptions/Serilog.Exceptions/_packaging?_a=package&feed=8479813c-da6b-4677-b40d-78df8725dc9c&package=212043f6-5fe5-4c79-949e-162156b89894&preferRelease=true) [![Serilog.Exceptions NuGet Package Downloads](https://img.shields.io/nuget/dt/Serilog.Exceptions)](https://www.nuget.org/packages/Serilog.Exceptions) [![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/RehanSaeedUK) [![Twitter Follow](https://img.shields.io/twitter/follow/rehansaeeduk.svg?style=social&label=Follow)](https://twitter.com/RehanSaeedUK)

@@ -147,7 +147,7 @@ Add the `SqlExceptionDestructurer` during setup:

[![Serilog.Exceptions.EntityFrameworkCore NuGet Package](https://img.shields.io/nuget/v/Serilog.Exceptions.EntityFrameworkCore.svg)](https://www.nuget.org/packages/Serilog.Exceptions.EntityFrameworkCore/) [![Serilog.Exceptions.EntityFrameworkCore package in serilog-exceptions feed in Azure Artifacts](https://feeds.dev.azure.com/serilog-exceptions/_apis/public/Packaging/Feeds/8479813c-da6b-4677-b40d-78df8725dc9c/Packages/ee2cd6f8-4c93-4774-9398-23c49ba41928/Badge)](https://dev.azure.com/serilog-exceptions/Serilog.Exceptions/_packaging?_a=package&feed=8479813c-da6b-4677-b40d-78df8725dc9c&package=ee2cd6f8-4c93-4774-9398-23c49ba41928&preferRelease=true) [![Serilog.Exceptions.EntityFrameworkCore NuGet Package Downloads](https://img.shields.io/nuget/dt/Serilog.Exceptions.EntityFrameworkCore)](https://www.nuget.org/packages/Serilog.Exceptions.EntityFrameworkCore)

> **WARNING**: In older versions of Serilog.Exceptions, if you are using EntityFrameworkCore with Serilog.Exceptions you must add this, otherwise in certain cases your entire database will be logged! This is because the exceptions in Entity Framework Core have properties that link to the entire database schema in them (See [#100](https://github.com/RehanSaeed/Serilog.Exceptions/issues/100), [aspnet/EntityFrameworkCore#15214](https://github.com/aspnet/EntityFrameworkCore/issues/15214)). Newer versions of Serilog.Exceptions avoids this issue by preventing the destructure of properties that implement IQueryable preventing their execution.
> **WARNING**: In versions of Serilog.Exceptions older than [8.0.0](https://github.com/RehanSaeed/Serilog.Exceptions/releases/tag/8.0.0), if you are using EntityFrameworkCore with Serilog.Exceptions you must add this, otherwise in certain cases your entire database will be logged! This is because the exceptions in Entity Framework Core have properties that link to the entire database schema in them (See [#100](https://github.com/RehanSaeed/Serilog.Exceptions/issues/100), [aspnet/EntityFrameworkCore#15214](https://github.com/aspnet/EntityFrameworkCore/issues/15214)). Newer versions of Serilog.Exceptions avoids this issue by preventing the destructure of properties that implement IQueryable preventing their execution.
Add the [Serilog.Exceptions.EntityFrameworkCore](https://www.nuget.org/packages/Serilog.Exceptions.EntityFrameworkCore/) NuGet package to your project when using EntityFrameworkCore in your project

2 changes: 1 addition & 1 deletion Source/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
</PropertyGroup>

<ItemGroup Label="Package References">
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" />
</ItemGroup>

<ItemGroup Label="Files">
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup Label="Package References">
<PackageReference Include="Microsoft.Data.SqlClient" Version="3.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup Label="Package References">
<PackageReference Include="Refit" Version="6.0.15" />
<PackageReference Include="Refit" Version="6.3.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ public class DestructuringOptionsBuilder : IDestructuringOptions
new ArgumentExceptionDestructurer(),
new ArgumentOutOfRangeExceptionDestructurer(),
new AggregateExceptionDestructurer(),
new RegexMatchTimeoutExceptionDestructurer(),
new ReflectionTypeLoadExceptionDestructurer(),
new OperationCanceledExceptionDestructurer(),
new TaskCanceledExceptionDestructurer(),
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace Serilog.Exceptions.Destructurers
{
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Serilog.Exceptions.Core;

/// <summary>
/// Destructurer for <see cref="RegexMatchTimeoutException"/>.
/// </summary>
public class RegexMatchTimeoutExceptionDestructurer
: ExceptionDestructurer
{
/// <inheritdoc cref="IExceptionDestructurer.TargetTypes"/>
public override Type[] TargetTypes => new Type[]
{
typeof(RegexMatchTimeoutException),
};

/// <inheritdoc cref="IExceptionDestructurer.Destructure"/>
public override void Destructure(Exception exception, IExceptionPropertiesBag propertiesBag, Func<Exception, IReadOnlyDictionary<string, object?>?> destructureException)
{
base.Destructure(exception, propertiesBag, destructureException);

#pragma warning disable CA1062 // Validate arguments of public methods
var typedException = (RegexMatchTimeoutException)exception;
propertiesBag.AddProperty(nameof(RegexMatchTimeoutException.Input), typedException.Input);
propertiesBag.AddProperty(nameof(RegexMatchTimeoutException.Pattern), typedException.Pattern);
propertiesBag.AddProperty(nameof(RegexMatchTimeoutException.MatchTimeout), typedException.MatchTimeout.ToString("c"));
#pragma warning restore CA1062 // Validate arguments of public methods
}
}
}
6 changes: 3 additions & 3 deletions Tests/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<ItemGroup Label="Package References">
<PackageReference Include="coverlet.collector" PrivateAssets="All" Version="3.1.0">
<PackageReference Include="coverlet.collector" PrivateAssets="All" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeCoverage" PrivateAssets="All" Version="17.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Microsoft.CodeCoverage" PrivateAssets="All" Version="17.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" Version="2.4.3">
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace Serilog.Exceptions.Test.Destructurers
{
using System;
using System.Text.RegularExpressions;
using Serilog.Exceptions.Core;
using Serilog.Exceptions.Destructurers;
using Xunit;
using static LogJsonOutputUtils;

public class RegexMatchTimeoutExceptionDestructurerTests
{
[Fact]
public void RegexMatchTimeoutException_ParamsAttachedAsProperties()
{
var exception = new RegexMatchTimeoutException("input", "pattern", TimeSpan.FromSeconds(1));

var optionsBuilder = new DestructuringOptionsBuilder()
.WithDestructurers(new IExceptionDestructurer[]
{
new RegexMatchTimeoutExceptionDestructurer(),
});

var loggedExceptionDetails = ExtractExceptionDetails(LogAndDestructureException(exception, optionsBuilder));

Assert_ContainsPropertyWithValue(loggedExceptionDetails, nameof(RegexMatchTimeoutException.Input), exception.Input);
Assert_ContainsPropertyWithValue(loggedExceptionDetails, nameof(RegexMatchTimeoutException.Pattern), exception.Pattern);
Assert_ContainsPropertyWithValue(loggedExceptionDetails, nameof(RegexMatchTimeoutException.MatchTimeout), exception.MatchTimeout.ToString("c"));
}
}
}
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup Label="Package References">
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="FluentAssertions" Version="6.5.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ version: "{build}"
image:
- macOS
- Ubuntu
- Visual Studio 2019
- Visual Studio 2022

environment:
# Disable the .NET logo in the console output.
19 changes: 9 additions & 10 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
var target = Argument("Target", "Default");
var configuration =
HasArgument("Configuration") ? Argument<string>("Configuration") :
EnvironmentVariable("Configuration") is not null ? EnvironmentVariable("Configuration") :
"Release";
EnvironmentVariable("Configuration", "Release");

var artefactsDirectory = Directory("./Artefacts");

@@ -20,17 +19,17 @@ Task("Restore")
.IsDependentOn("Clean")
.Does(() =>
{
DotNetCoreRestore();
DotNetRestore();
});

Task("Build")
.Description("Builds the solution.")
.IsDependentOn("Restore")
.Does(() =>
{
DotNetCoreBuild(
DotNetBuild(
".",
new DotNetCoreBuildSettings()
new DotNetBuildSettings()
{
Configuration = configuration,
NoRestore = true,
@@ -41,9 +40,9 @@ Task("Test")
.Description("Runs unit tests and outputs test results to the artefacts directory.")
.DoesForEach(GetFiles("./Tests/**/*.csproj"), project =>
{
DotNetCoreTest(
DotNetTest(
project.ToString(),
new DotNetCoreTestSettings()
new DotNetTestSettings()
{
Blame = true,
Collectors = new string[] { "Code Coverage", "XPlat Code Coverage" },
@@ -63,13 +62,13 @@ Task("Pack")
.Description("Creates NuGet packages and outputs them to the artefacts directory.")
.Does(() =>
{
DotNetCorePack(
DotNetPack(
".",
new DotNetCorePackSettings()
new DotNetPackSettings()
{
Configuration = configuration,
IncludeSymbols = true,
MSBuildSettings = new DotNetCoreMSBuildSettings()
MSBuildSettings = new DotNetMSBuildSettings()
{
ContinuousIntegrationBuild = !BuildSystem.IsLocalBuild,
},
2 changes: 1 addition & 1 deletion dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "1.3.0",
"version": "2.0.0",
"commands": [
"dotnet-cake"
]
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,6 @@
"sdk": {
"allowPrerelease": true,
"rollForward": "latestMajor",
"version": "6.0.100"
"version": "6.0.102"
}
}