From the Log4j 2 documentation:
When AsyncLoggerContextSelector is used to make all loggers asynchronous,
make sure to use normal <root> and <logger> elements in the configuration.
The AsyncLoggerContextSelector will ensure that all loggers are
asynchronous, using a mechanism that is different from what happens when
you configure <asyncRoot> or <asyncLogger>. The latter elements are
intended for mixing async with sync loggers.
https://logging.apache.org/log4j/2.x/manual/async.html
Since we are not using mixed sync/async loggers, we should use the
system property to enable the async loggers.
Fixes a long-standing race condition in TerminalConsoleAppender,
that eventually resulted in IllegalStateExceptions or duplicate
input prompts.
Fixes#242, Fixes#188