Ejemplo n.º 1
0
        // public static string LogFilePath;

        /// <summary>
        ///     It's best to subscribe this method to 'exiting' events of your application.
        ///     It still tries to exit gracefully, but not all the cases is possible to cover
        ///     without application-specific exit events.
        /// </summary>
        public static void DoGracefullExit()
        {
            try
            {
                LogQueue.CompleteAdding();
                _writingThread.Join();
            }
            catch
            {
                // we rally don't care about exceptions here
            }
        }
 public static void Stop()
 {
     LogQueue.CompleteAdding();
 }