Block until all messages being logged have finished processing.
If the
MonadIO constraint can't be satisfied, then use
flush' instead.
Manually calling
flush is not usually necessary because
new does it already, if at some point you want to ensure that
all messages logged until then have properly commited, then
flush will block until that happens.
Please see
log to understand how exceptions behave in this
function (hint: they behave unsurprisingly).