Class EventTarget (5.0.0)

public sealed class EventTarget

Represents the location error events will be sent.

Inheritance

Object > EventTarget

Namespace

Google.Cloud.Diagnostics.Common

Assembly

Google.Cloud.Diagnostics.Common.dll

Properties

Kind

public EventTargetKind Kind { get; }

The type of location to send error events to.

Property Value
TypeDescription
EventTargetKind

LogTarget

public LogTarget LogTarget { get; }

If this even target type is Logging, this is the target log to send error reports to. It will be null otherwise. Note that currently, only Logging is supported then, in practice, this will never be null.

Property Value
TypeDescription
LogTarget

ProjectId

public string ProjectId { get; }

If LogTarget is of Project this is ProjectId. Null otherwise.

Property Value
TypeDescription
String

Methods

ForLogTarget(LogTarget)

public static EventTarget ForLogTarget(LogTarget target)

Creates a new EventTarget instance that will report to the Google Cloud Logging API. The events are then automatically propagated to the Google Cloud Error Logging API from the Google Cloud Logging API.

Parameter
NameDescription
targetLogTarget

The LogTarget to create the EventTarget from. Must not be null.

Returns
TypeDescription
EventTarget
Remarks

For more information see "Formatting Log Error Messages" (https://cloud.google.com/error-reporting/docs/formatting-error-messages).

ForProject(String)

public static EventTarget ForProject(string projectId)

Creates a new EventTarget instance that will report to the Google Cloud Logging API. The events are then automatically propagated to the Google Cloud Error Logging API from the Google Cloud Logging API.

Parameter
NameDescription
projectIdString

The project ID to create the underlying LogTarget from. Must not be null.

Returns
TypeDescription
EventTarget
Remarks

For more information see "Formatting Log Error Messages" (https://cloud.google.com/error-reporting/docs/formatting-error-messages).