public sealed class EventTarget
Represents the location error events will be sent.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
Google.Cloud.Diagnostics.Common.dll
Properties
Kind
public EventTargetKind Kind { get; }
The type of location to send error events to.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
LogTarget |
ProjectId
public string ProjectId { get; }
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
target | LogTarget The LogTarget to create the EventTarget from. Must not be null. |
Returns | |
---|---|
Type | Description |
EventTarget |
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 | |
---|---|
Name | Description |
projectId | String The project ID to create the underlying LogTarget from. Must not be null. |
Returns | |
---|---|
Type | Description |
EventTarget |
For more information see "Formatting Log Error Messages" (https://cloud.google.com/error-reporting/docs/formatting-error-messages).