Unit test for Serilog write to console

1k views Asked by At

Application is in .net framework and using Serilog for logging.

Configuration

Logger = new LoggerConfiguration()
    .Enrich.FromLogContext()
    .MinimumLevel.Debug()
    .WriteTo.Console()
    .CreateLogger()

In Unit test how to verify that logger has the values which is expected to be?

Is there any way to read the values using any of Serilog api/methods?

0

There are 0 answers