예제 #1
0
        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());
        }
예제 #2
0
 public void LogError(TraceData data, Exception ex = null)
 {
     logMethod(this, data, ex);
 }