/// <summary>
 /// Creates an <see cref="ErrorReportingOptions"/> that will send error events to the
 /// Google Cloud Logging API.
 /// </summary>
 /// <param name="projectId">Optional if running on Google App Engine or Google Compute Engine.
 ///     The Google Cloud Platform project ID. If running on GAE or GCE the project ID will be
 ///     detected from the platform.</param>
 /// <param name="bufferOptions">The buffer options for the error reporter. Defaults to no buffer.</param>
 /// <param name="retryOptions">The retry options for the error reporter. Defaults to no retry.</param>
 public static ErrorReportingOptions Create(
     string projectId = null, BufferOptions bufferOptions = null, RetryOptions retryOptions = null) =>
 Create(EventTarget.ForLogging(projectId), bufferOptions, retryOptions);
Пример #2
0
 /// <summary>
 /// Creates an <see cref="ErrorReportingOptions"/> that will send error events to the
 /// Stackdriver Logging API.
 /// </summary>
 /// <param name = "projectId">The Google Cloud Platform project Id. Cannot be null.</param>
 /// <param name="bufferOptions">The buffer options for the error reporter. Defaults to no buffer.</param>
 public static ErrorReportingOptions Create(
     string projectId, BufferOptions bufferOptions = null)
 {
     GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId));
     return(Create(EventTarget.ForLogging(projectId), bufferOptions));
 }