InstanceLogger extension - log testing

For Proto.Actor .NET, there is now a new extension called InstanceLogger.
This works similar to normal logging, but instead outputs results in a LogStore.

The LogStore can then be used to both output a full log for your tests, or to scan the logs for specific entries.

This is especially useful when trying to debug complex asynchronous workflows.
This feature was for example used to complete the Cluster Gossip module, to ensure that all expected events occurred in the correct order.

var system = new ActorSystem();

//create the log store
var logStore = new LogStore();

//register the plugin
system.Extensions.Register(new InstanceLogger(LogLevel.Debug, logStore));

//get the logger
var logger = system.Logger();

//use ? to make the action a no-op if no logger is registered
logger?.LogDebug("...123....Hello...456...");
logger?.LogDebug("...789....World...012...");

//log scanning
var hello = logStore.FindEntry("Hello")!;

//test assertions
Assert.NotNull(hello);
            
var world = logStore.FindEntry("World")!;
Assert.NotNull(world);
            
//compare entries with eachother
Assert.True(hello.IsBefore(world));