public static void LogEvent(this ExEventLog.EventTuple tuple, string periodicKey, out bool fEventSuppressed, params object[] messageArgs) { DiagCore.EventLog.LogEvent(tuple, periodicKey, out fEventSuppressed, messageArgs); if (!fEventSuppressed) { string text = tuple.EventLogToString(messageArgs); if (!string.IsNullOrEmpty(text)) { string text2 = string.Empty; if (messageArgs.Length > 0) { text2 = string.Join(",\n", messageArgs); } EventLogEntryType entryType = tuple.EntryType; ReplayCrimsonEvent replayCrimsonEvent; switch (entryType) { case EventLogEntryType.Error: goto IL_7C; case EventLogEntryType.Warning: replayCrimsonEvent = ReplayCrimsonEvents.AppLogMirrorWarning; goto IL_8A; case (EventLogEntryType)3: goto IL_84; case EventLogEntryType.Information: break; default: if (entryType != EventLogEntryType.SuccessAudit) { if (entryType != EventLogEntryType.FailureAudit) { goto IL_84; } goto IL_7C; } break; } replayCrimsonEvent = ReplayCrimsonEvents.AppLogMirrorInformational; goto IL_8A; IL_7C: replayCrimsonEvent = ReplayCrimsonEvents.AppLogMirrorError; goto IL_8A; IL_84: replayCrimsonEvent = ReplayCrimsonEvents.AppLogMirrorInformational; IL_8A: replayCrimsonEvent.LogGeneric(new object[] { DiagCore.GetEventViewerEventId(tuple), text, text2 }); } } }
private void DismountForSourceLogCorruption(Exception corruptionEx) { ReplayEventLogConstants.Tuple_CorruptLogRecoveryIsImmediatelyAttempted.LogEvent(null, new object[] { this.DatabaseCopyName, corruptionEx.Message }); try { ReplicaInstanceManager replicaInstanceManager = Dependencies.ReplayCoreManager.ReplicaInstanceManager; int num; string text = ReplayEventLogConstants.Tuple_CorruptLogRecoveryIsImmediatelyAttempted.EventLogToString(out num, new object[] { this.DatabaseCopyName, corruptionEx.Message }); uint eventViewerEventId = DiagCore.GetEventViewerEventId(ReplayEventLogConstants.Tuple_CorruptLogRecoveryIsImmediatelyAttempted); replicaInstanceManager.RequestSuspendAndFail(this.DatabaseGuid, eventViewerEventId, text, text, false, false, false, false); MonitoredDatabase.Tracer.TraceDebug((long)this.GetHashCode(), "DismountForSourceLogCorruption successfully suspended"); } catch (TaskServerException ex) { MonitoredDatabase.Tracer.TraceError <TaskServerException>((long)this.GetHashCode(), "DismountForSourceLogCorruption failed to suspend: {0}", ex); ReplayEventLogConstants.Tuple_CorruptLogRecoveryFailedToSuspend.LogEvent(null, new object[] { this.DatabaseName, ex.Message }); } finally { Exception ex2 = this.TryToDismountClean(); if (ex2 != null) { ReplayEventLogConstants.Tuple_CorruptLogRecoveryFailedToDismount.LogEvent(null, new object[] { this.DatabaseName, ex2.Message }); } } }
// Token: 0x06000D09 RID: 3337 RVA: 0x000396E4 File Offset: 0x000378E4 public void SetDisconnected(ExEventLog.EventTuple eventTuple, LocalizedString errorMessage) { this.SetState(FailureInfo.FailureFlags.Disconnected, new uint?(DiagCore.GetEventViewerEventId(eventTuple)), errorMessage, null); }
// Token: 0x06000D08 RID: 3336 RVA: 0x000396CE File Offset: 0x000378CE public void SetBroken(ExEventLog.EventTuple eventTuple, LocalizedString errorMessage, ExtendedErrorInfo extendedErrorInfo) { this.SetState(FailureInfo.FailureFlags.Failed, new uint?(DiagCore.GetEventViewerEventId(eventTuple)), errorMessage, extendedErrorInfo); }