You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
The console logger adds considerable latency to requests. Here's a comparsion of the average and maximum latency with no logging, serilog to a file, and console logging:
A few options were discussed to improve console logging performance:
Don't block the request waiting for calls to Console.WriteLine() (or setting console colors). Queue writes to something faster like ConcurrentQueue, and use a background thread to remove from queue and call Console.WriteLine(). One downside is that log writes may appear out-of-order with respect to direct Console.WriteLine() calls. Another downside is the server process may end before all logs have been flushed from the queue.
Still write to the console synchronously during the request, but avoid expensive operations like setting colors. Could be an option on the existing console logger, or a new FastConsoleLogger.