How to effectively log asynchronously?
I wrote this code a while back, feel free to use it. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace MediaBrowser.Library.Logging { public abstract class ThreadedLogger : LoggerBase { Queue<Action> queue = new Queue<Action>(); AutoResetEvent hasNewItems = new AutoResetEvent(false); volatile bool waiting = false; public ThreadedLogger() : base() { Thread loggingThread = … Read more