.NET Core implmenetation of Microsoft.Extensions.Logging
, which logs into memory.
Useful for test automation.
Install NuGet package : Install-Package Euphoric.Logging.Memory
Setup logger provider : services.AddLogging(loggingBuilder => loggingBuilder.AddMemoryLogger());
To retrieve the logs from memory :
var memoryLogger = sp.GetRequiredService<IMemoryLogSource>();
var loggedEntries = memoryLogger.Logs;