protected override string Format(LoggingLevel level, string message, Exception exception) { if (level.IsSeriousError()) { lock (myMonitor) { myExceptions.Add(exception == null ? new Exception(message) : new Exception(message, exception)); } } return(JetBrains.Diagnostics.Log.DefaultFormat( DateTime.Now, level, Category, Thread.CurrentThread, message, exception)); }