Run a block of code while the provided appender capturing the events
Run a block of code while the provided appender capturing the events
Only one of these blocks can be active at a time. The system will impose synchronization to enforce this, so you may have deadlocks if you have several of these blocks running concurrently and producing values for one another.
This will only allow you to process events from the same thread that
called withAppender
, so you should use Await
if you are testing
asynchronous code (or you can manage the queue yourself).