public sealed class LogTargetReference documentation and code samples for the Google.Cloud.Diagnostics.Common class LogTarget.
Represents the location log entries will be sent, such as a project or organization.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
Google.Cloud.Diagnostics.Common.dll
Properties
Kind
public LogTargetKind Kind { get; }The location to log entries to.
| Property Value | |
|---|---|
| Type | Description | 
| LogTargetKind | |
OrganizationId
public string OrganizationId { get; }The Google Cloud Platform organization Id.
| Property Value | |
|---|---|
| Type | Description | 
| string | |
ProjectId
public string ProjectId { get; }The Google Cloud Platform project Id.
| Property Value | |
|---|---|
| Type | Description | 
| string | |
Methods
ForOrganization(string)
public static LogTarget ForOrganization(string organizationId)Creates a LogTarget instance for sending log entries to an Organization.
| Parameter | |
|---|---|
| Name | Description | 
| organizationId | string | 
| Returns | |
|---|---|
| Type | Description | 
| LogTarget | |
ForProject(string)
public static LogTarget ForProject(string projectId)| Parameter | |
|---|---|
| Name | Description | 
| projectId | string | 
| Returns | |
|---|---|
| Type | Description | 
| LogTarget | |
GetFullLogName(string)
public string GetFullLogName(string name)Gets the full log name. See: https://cloud.google.com/logging/docs/api/reference/rest/v2/LogEntry.
| Parameter | |
|---|---|
| Name | Description | 
| name | stringThe name of the log which will be used with the project or organization to create a full log name. | 
| Returns | |
|---|---|
| Type | Description | 
| string | |