private void Add(MainLogItem logItem)
        {
            _queuedLogItemHandler.Add(logItem);

            try
            {
                NewLogItem?.Invoke(this, new MainLogItemEventArgs(logItem));
            }
            catch (Exception exception)
            {
                Debug.WriteLine($"EXCEPTION IN {nameof(MainLog)}: {exception}");
            }
        }
        public void AddException(string message, Exception exception, LogLevel logLevel, string memberName, string filePath, int lineNumber)
        {
            if (logLevel > _logLevel)
            {
                return;
            }

            var logItem = new MainLogItem(
                DateTime.UtcNow,
                logLevel,
                Thread.CurrentThread.Name ?? $"<thread>_{Thread.CurrentThread.ManagedThreadId}",
                filePath,
                lineNumber.ToString(),
                memberName,
                message,
                exception);

            Add(logItem);
        }
 public MainLogItemEventArgs(MainLogItem logItem)
 {
     LogItem = logItem;
 }