Exemple #1
0
        private static void LogException(Exception exception, LoggingEventType severity)
        {
            Exception exceptionToLog = ExtractUsefulExceptionToLog(exception);

            string message = LoggingHelper.GetExceptionMessageOrExceptionType(exception);

            // We use the default LoggingProvider and we simply expect logging to succeed.
            Logger.Log(new LogEntry(severity, message, null, exceptionToLog));
        }