How to unit test Serilog LogContext with TestCorrelator

I recently had a use case where I had added custom properties to the LogContext with Serilog, and I wanted to be able to test if those properties were being added as expected. As it turns out, this is actually quite easy, thanks to a library called TestCorrelator by Mitch Bodmer over at https://github.com/MitchBodmer/serilog-sinks-testcorrelator (which

How to unit test Serilog LogContext with TestCorrelator Read More »

Scroll to Top