internal static void LogError(CriticalEvent logEvent, TraceData data, Exception ex) { Contract.Requires(ex != null); Contract.Requires(logEvent != null); StringBuilder sbMessage = new StringBuilder(); sbMessage.Append(string.Format(logEvent.Format, ex.Message)); sbMessage.Append(string.Format(" [#{0}]", logEvent.Id)); sbMessage.Append("\n\tError in " + data.MethodSignature); logEvent.TraceSource.TraceEvent(TraceEventType.Critical, logEvent.Id, sbMessage.ToString()); }
public void LogError(TraceData data, Exception ex = null) { logMethod(this, data, ex); }