NuGet package Logging.Memory
public void Configure(IApplicationBuilder app,
IHostingEnvironment env,
ILoggerFactory loggerFactory)
{
...
loggerFactory.MinimumLevel = LogLevel.Debug;
loggerFactory.AddMemory();
...
}
var logList = MemoryLogger.LogList;
Since v2.0.0 you can get log for concrete LogLevel:
var warnLog = MemoryLogger.GetLog(LogLevel.Warning);