Exemplo n.º 1
0
 public ProblemReport(string workerId, WorkerStage workerStage, Exception ex)
 {
     WorkerId = workerId;
     WorkerStage = workerStage;
     if (ex != null)
     {
         ExceptionString = ex.ToDebugString();
     }
 }
 protected void ReportToDirector(Exception ex)
 {
     ReportToDirector(ex.ToDebugString());
 }
Exemplo n.º 3
0
        public void LogSwallowedException(Exception ex)
        {
            if (null == loggerInstance)
            {
                System.Diagnostics.Debug.Assert(false, "Attempt to LogSwallowedException to NamedTracer before initialization.");
                return;
            }

            ThreadAbortException threadAbortException = ex as ThreadAbortException;
            if (null != threadAbortException)
            {
                return;
            }

            LogEventInfo theEvent = new LogEventInfo
            {
                                                       TimeStamp = DateTime.Now,
                                                       LoggerName = loggerInstance.Name,
                                                       Level = LogLevel.Trace, 
                                                       Message = "SWALLOWED Exception: " + ex.ToDebugString(),
                                                       Exception = ex
                                                     };
            theEvent.Properties["CorrelationId"] = ex.GetCorrelationId();
            SetSubprocessOriginator(theEvent);
            DebugMessageIntercept(theEvent);

            loggerInstance.Log(theEvent);
        }