Log
method is nonblocking: log events are placed into an internal queue, grouped into batches and efficiently written to console output stream in the background.ConsoleLogSettings
have to offer:ColorsEnabled
false
ColorMapping
Debug
=> Gray
, Info
=> White
, Warn
=> Yellow
, Error
=> Red
, Fatal
=> DarkRed
ConsoleLog
instances in the application. It is accessed as follows:EventsQueueCapacity
50000
OutputBufferSize
65536
Flush
or FlushAsync
methods of ConsoleLog
to ensure that all logged events have been written to console when the application shuts down.EventsLost
property of a single ConsoleLog
instance or static TotalEventsLost
property to check if any events have been discarded.ConsoleLog
emits a special diagnostic message that looks like this:Log
method:ConsoleLog
due to lack of buffering, but it removes the need to flush and works well in test environments where Console.Out
cannot be safely cached.