An open API service indexing awesome lists of open source software.

https://github.com/verifytests/verify.serilog

Extends Verify to allow verification of Serilog bits.
https://github.com/verifytests/verify.serilog

Last synced: 3 months ago
JSON representation

Extends Verify to allow verification of Serilog bits.

Awesome Lists containing this project

README

          

# Verify.Serilog

[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true&label=)](https://github.com/orgs/VerifyTests/discussions)
[![Build status](https://ci.appveyor.com/api/projects/status/bgvkfjn26l5b4kba?svg=true)](https://ci.appveyor.com/project/SimonCropp/verify-serilog)
[![NuGet Status](https://img.shields.io/nuget/v/Verify.Serilog.svg)](https://www.nuget.org/packages/Verify.Serilog/)

Extends [Verify](https://github.com/VerifyTests/Verify) to allow verification of [Serilog](https://serilog.net/) bits.

**See [Milestones](../../milestones?state=closed) for release notes.**

## NuGet package

https://nuget.org/packages/Verify.Serilog/

## Usage


```cs
[ModuleInitializer]
public static void Initialize() =>
VerifySerilog.Initialize();
```
snippet source | anchor


```cs
[Fact]
public Task Usage()
{
Recording.Start();

var result = Method();

return Verify(result);
}

static string Method()
{
Log.Error("The Message");
return "Result";
}
```
snippet source | anchor

Results in:


```txt
{
target: Result,
log: {
Error: The Message
}
}
```
snippet source | anchor