/// <summary> /// The write event log. /// </summary> /// <param name="categoryName"> /// The category name. /// </param> /// <param name="eventSeverity"> /// The event severity. /// </param> /// <param name="message"> /// The message. /// </param> private static void WriteEventLog(string categoryName, EventSeverity eventSeverity, string message) { try { UnifiedLoggingServer localService = Local; if (localService != null) { SPDiagnosticsCategory category = localService.Areas[AreaName].Categories[categoryName]; localService.WriteEvent(1, category, eventSeverity, message); } } catch { } }
/// <summary> /// Traces the log. /// </summary> public void TraceLog() { UnifiedLoggingServer.LogMedium(this.ToString(true)); }
/// <summary> /// Traces the log. /// </summary> private void TraceLog() { UnifiedLoggingServer.LogMedium(this.ToString()); }