コード例 #1
0
 private ErrorReportingOptions(EventTarget eventTarget, BufferOptions bufferOptions, RetryOptions retryOptions)
     : this(GaxPreconditions.CheckNotNull(eventTarget, nameof(eventTarget)).LogName ?? LogNameDefault,
            eventTarget.MonitoredResource ?? MonitoredResourceBuilder.FromPlatform(),
            bufferOptions,
            retryOptions) =>
コード例 #2
0
 /// <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);
コード例 #3
0
 private ErrorReportingOptions(EventTarget eventTarget, BufferOptions bufferOptions, RetryOptions retryOptions)
 {
     EventTarget   = GaxPreconditions.CheckNotNull(eventTarget, nameof(eventTarget));
     BufferOptions = GaxPreconditions.CheckNotNull(bufferOptions, nameof(bufferOptions));
     RetryOptions  = GaxPreconditions.CheckNotNull(retryOptions, nameof(retryOptions));
 }
コード例 #4
0
 /// <summary>
 /// Creates an <see cref="ErrorReportingOptions"/>.
 /// </summary>
 /// <param name="eventTarget">Where the error events should be sent. Must not be null.</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(
     EventTarget eventTarget, BufferOptions bufferOptions = null, RetryOptions retryOptions = null) =>
 new ErrorReportingOptions(eventTarget,
                           bufferOptions ?? BufferOptions.NoBuffer(), retryOptions ?? RetryOptions.NoRetry());
コード例 #5
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));
 }