/// <summary> /// Adds a call completion entry to the log if exhaustive detail entries are added. /// </summary> /// <param name="callName"> /// The name of the call whose completion to log. /// </param> /// <param name="callCompletionStatus"> /// The call status at the completion of the call. /// </param> /// <param name="analyticsInformation"> /// The object through which analytics information can be added and obtained. /// </param> /// <exception cref="ArgumentNullException"> /// Parameter analyticsInformation cannot be null. /// </exception> /// <remarks> /// This should eventually be replaced with performance counters. /// </remarks> public void ExhaustiveCallCompletion(string callName, CallCompletionStatus callCompletionStatus, PerformanceInformation analyticsInformation) { if (analyticsInformation == null) { throw new ArgumentNullException("analyticsInformation", "Parameter analyticsInformation cannot be null."); } // Generally, exhausive detail entries will not be included in the log. if (LogVerbosity == SourceLevels.All) { CallCompletion(callName, callCompletionStatus, analyticsInformation, DefaultLogEntryEventId.Verbose); } }
/// <summary> /// Adds a call completion entry to the log. /// </summary> /// <param name="callName"> /// The name of the call whose completion to log. /// </param> /// <param name="callCompletionStatus"> /// The call status at the completion of the call. /// </param> /// <param name="performanceInformation"> /// The object through which analytics information can be added and obtained. /// </param> /// <param name="eventId"> /// The event ID to use when logging call completion. Default value is DefaultLogEntryEventId.CallCompletion. /// </param> /// <exception cref="ArgumentNullException"> /// Parameter analyticsInformation cannot be null. /// </exception> /// <remarks> /// This should eventually be replaced with performance counters. /// </remarks> public void CallCompletion(string callName, CallCompletionStatus callCompletionStatus, PerformanceInformation performanceInformation, DefaultLogEntryEventId eventId = DefaultLogEntryEventId.CallCompletion) { if (performanceInformation == null) { throw new ArgumentNullException("performanceInformation", "Parameter performanceInformation cannot be null."); } if (IsLoggingDisabled() == false) { Log.Info((int)eventId, ActivityId, "Call to {0} completed with result {1} and these performance measures:\r\n {2}.", callName, callCompletionStatus, performanceInformation.Collate()); } }