private void Handle(LogSeverity severity, string message, ExceptionData exceptionData, bool log) { message = NormalizationUtils.NormalizeXmlText(message); if (exceptionData != null) { exceptionData = exceptionData.Normalize(); } if (log) { inner.Log(severity, message, exceptionData); } // Note: We avoid taking any locks here because it would be too easy to end up // in a deadlock between logging and reporting code. Instead we compensate in // the listener by dropping the log message if the listener has been disposed. Listener currentListener = listener; if (currentListener != null) { listener.RecordLogEntry(severity, message, exceptionData); } }
private void Handle(LogSeverity severity, string message, ExceptionData exceptionData, bool log) { message = NormalizationUtils.NormalizeXmlText(message); if (exceptionData != null) exceptionData = exceptionData.Normalize(); if (log) inner.Log(severity, message, exceptionData); // Note: We avoid taking any locks here because it would be too easy to end up // in a deadlock between logging and reporting code. Instead we compensate in // the listener by dropping the log message if the listener has been disposed. Listener currentListener = listener; if (currentListener != null) listener.RecordLogEntry(severity, message, exceptionData); }