Log a message with the given importance
level.
This function returns immediately after queing the message for
logging. The actual printing of the log message will happen in a
different thread, asynchronously. If you want to explicitly wait for
the message to be logged, then call
flush afterwards.
Log messages are rendered in FIFO order, and their timestamp records
the time when this
log function was called, rather than the
time when the log message is printed in the future.
Note regarding exceptions: Any exception thrown by
natSTM will be thrown here.
Synchronous exceptions that
happen due to failures in the actual committing of the log message,
which itself is performed in a different thread, are ignored (they
should be handled in the function passed to
new instead). If
an asynchronous exception kills the logging thread, then you will
synchronously get
ExceptionInLoggingWorker here, but by the
time that happens, that same exception will have already already been
thrown asynchronously to this same thread anyway, so unless you did
something funny to recover from that exception, you will have died
already.