Klogging handles most log events asynchronously by using Kotlin coroutines. This design takes logging away from the main threads of program execution as soon as possible.
But asynchronous processing delays the sending of log events to sinks, so they may be lost when the program finishes. This can be a problem if the log events occur immediately before a program crashes. Those events may contain valuable information about why the crash happened.
In the DSL:
// Other configuration
The level can also be set using the environment