/// <summary> /// Override TraceData to hook in our custom behavior. I.e. only take notice if we're tracing an exception that has a trace code of /// ESBExcepction /// </summary> /// <param name="eventCache"></param> /// <param name="source"></param> /// <param name="eventType"></param> /// <param name="id"></param> /// <param name="data"></param> public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data) { if (id != (int)TraceCode.Exception) { return; } if (data is Exception) { var ex = data as Exception; MailMan.SendAppException(ex); } }