private static void LogEntryGuid(ActivityLogEntryType type, string source, string message, Guid guid) { IVsActivityLog log = Log; if (log != null) { log.LogEntryGuid(VsxConverter.MapLogTypeToAle(type), source, message, guid); } }
/// <summary> /// Creates a new log entry /// </summary> /// <param name="type">Category of the entry</param> /// <param name="message">Message</param> /// <param name="guid">GUID of the object that caused the error</param> public static void Log(EntryType type, string message, Guid guid) { if (message == null) { throw new ArgumentNullException("message"); } if (guid == null) { throw new ArgumentNullException("guid"); } if (Source == null) { throw new InvalidOperationException("ActivityLogger is not sufficiently initialized."); } int hr = logService.LogEntryGuid((uint)type, Source, message, guid); Marshal.ThrowExceptionForHR(hr); }