protected virtual void LogFaultException(string operationName, ClientInformation clientInfo, FaultException <DiagnosticsAggregationFault> faultException) { ExTraceGlobals.DiagnosticsAggregationTracer.TraceError <string, FaultException <DiagnosticsAggregationFault> >(0L, "Operation {0} encountered exception {1}", operationName, faultException); DiagnosticsAggregationEvent evt = (operationName == "GetLocalView") ? DiagnosticsAggregationEvent.LocalViewRequestReceivedFailed : DiagnosticsAggregationEvent.AggregatedViewRequestReceivedFailed; this.log.LogOperationFromClient(evt, clientInfo, null, faultException.Detail.ToString()); }
private void Log(DiagnosticsAggregationEvent evt, uint?sessionId, TimeSpan?duration, string clientHostName, string clientProcessName, int?clientProcessId, string serverHostName, string description) { if (!this.loggingEnabled) { return; } LogSchema logSchema = DiagnosticsAggregationLog.schema; uint? num = sessionId; DiagnosticsAggregationLogRow row = new DiagnosticsAggregationLogRow(logSchema, evt, (num != null) ? new long?((long)((ulong)num.GetValueOrDefault())) : null, duration, clientHostName, clientProcessName, clientProcessId, serverHostName, description); try { lock (this) { if (this.loggingEnabled) { this.log.Append(row, 0); } } } catch (ObjectDisposedException) { ExTraceGlobals.DiagnosticsAggregationTracer.TraceError(0L, "Appending to Diagnostics Aggregation log failed with ObjectDisposedException"); } }
public DiagnosticsAggregationLogRow(LogSchema schema, DiagnosticsAggregationEvent evt, long?sessionId, TimeSpan?duration, string clientHostName, string clientProcessName, int?clientProcessId, string serverHostName, string description) : base(schema) { base[1] = Environment.MachineName; base[2] = ((sessionId != null) ? sessionId.ToString() : string.Empty); base[3] = evt; base[4] = ((duration != null) ? duration.ToString() : string.Empty); base[5] = clientHostName; base[6] = clientProcessName; base[7] = ((clientProcessId != null) ? clientProcessId.ToString() : string.Empty); base[8] = serverHostName; base[9] = description; }
protected virtual void HandleUnHandledException(string operationName, ClientInformation clientInfo, Exception e) { ExTraceGlobals.DiagnosticsAggregationTracer.TraceError <string, Exception>(0L, "Operation {0} encountered exception {1}", operationName, e); DiagnosticsAggregationServicelet.EventLog.LogEvent(MSExchangeDiagnosticsAggregationEventLogConstants.Tuple_DiagnosticsAggregationServiceUnexpectedException, null, new object[] { operationName, e.ToString() }); DiagnosticsAggregationEvent evt = (operationName == "GetLocalView") ? DiagnosticsAggregationEvent.LocalViewRequestReceivedFailed : DiagnosticsAggregationEvent.AggregatedViewRequestReceivedFailed; this.log.LogOperationFromClient(evt, clientInfo, null, e.ToString()); ExWatson.SendReportAndCrashOnAnotherThread(e); }
public void LogOperationToServer(DiagnosticsAggregationEvent evt, uint sessionId, string serverName, TimeSpan?duration = null, string description = "") { this.Log(evt, new uint?(sessionId), duration, string.Empty, string.Empty, null, serverName, description); }
public void LogOperationFromClient(DiagnosticsAggregationEvent evt, ClientInformation clientInfo, TimeSpan?duration = null, string description = "") { this.Log(evt, new uint?(clientInfo.SessionId), duration, (clientInfo != null) ? clientInfo.ClientMachineName : string.Empty, (clientInfo != null) ? clientInfo.ClientProcessName : string.Empty, (clientInfo != null) ? new int?(clientInfo.ClientProcessId) : null, string.Empty, description); }
public void Log(DiagnosticsAggregationEvent evt, string format, params object[] parameters) { this.Log(evt, null, null, string.Empty, string.Empty, null, string.Empty, string.Format(format, parameters)); }