Extensions.Logging.ListOfString (nuget): Extensions.Logging.ListOfString logs to a list of string so you can test your logging : ``` ILoggerFactory factory=new LoggerFactory.AddProvider(new StringListLoggerProvider()) ILogger logger= factory.CreateLogger("Test1");  ...tests... ;  StringListLogger.Instance    .LoggedLines    .ShouldContain(x=>x.Matches("kilroy was here")); ``` or ``` var loggedLines = new List<string>(); var logger= new LoggerFactory().AddStringListLogger(loggedLines).CreateLogger("Test2");  ...tests... ;  loggedLines   .ShouldContain(x=>x.Matches("kilroy was here too."));  ```  This is for Microsoft.Extensions.Logging.Abstractions. For Serilog, see https://www.nuget.org/packages/Serilog.Sinks.ListOfString/  Part of https://www.nuget.org/packages/TestBase   *TestBase* gives you a flying start to unit testing with fluent assertions that are easy to extend, and  tools for testing with dependencies on AspNetMvc, HttpClient, Ado.Net, Streams and Loggers.
Keywords: nunit|test|unittest|tdd|mock|logging|serilog