public virtual void EnqueueMessage(LogMessageEntry message) { if (!_messageQueue.IsAddingCompleted) { try { _messageQueue.Add(message); return; } catch (InvalidOperationException) { } } try { WriteMessage(message); } catch (Exception) { // ignored } }
internal virtual void WriteMessage(LogMessageEntry entry) { var console = entry.LogAsError ? errorConsole : this.console; console.Write(entry.Message); }