March 21, 2020

XUnit Logger Provider

When debugging tests it can be very convinient to see what is actually being logged in the applicaton. It is possible to use XUnit and a LoggerFactory to see what is going on. It looks like this:

Once you have this XUnit logger in a nice place where you can share it with your tests you can simply instantiate a logger with it from the factory:

Hoorah!