示例#1
0
 public void TraceError(Exception ex, bool includeStackTrace, Guid callToken)
 {
     if (IsEnabled)
     {
         ExceptionTextFormatter exceptionFormatter = new ExceptionTextFormatter(this.providerName);
         TraceEvent(TraceEventType.Error, WellKnownTraceCategory.TraceError, InstrumentationUtility.SystemEventId.Error, InstrumentationUtility.Resources.FormatStringTraceError, exceptionFormatter.FormatException(ex, includeStackTrace), callToken);
     }
 }
示例#2
0
        public void TraceError(Exception ex, bool includeStackTrace)
        {
            ExceptionTextFormatter exceptionFormatter = new ExceptionTextFormatter();

            TraceEvent(TraceEventType.Error, WellKnownTraceCategory.TraceError, InstrumentationUtility.SystemEventId.Error, InstrumentationUtility.Resources.FormatStringTraceErrorNoToken, exceptionFormatter.FormatException(ex, includeStackTrace));
        }