Class LogTarget
Represents the location log entries will be sent, such as a project or organization.
Inheritance
System.Object
LogTarget
Inherited Members
System.Object.ToString()
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Cloud.Diagnostics.Common
Assembly: Google.Cloud.Diagnostics.Common.dll
Syntax
public sealed class LogTarget
Properties
Kind
The location to log entries to.
Declaration
public LogTargetKind Kind { get; }
Property Value
| Type | Description |
|---|---|
| LogTargetKind |
OrganizationId
The Google Cloud Platform organization Id.
Declaration
public string OrganizationId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ProjectId
The Google Cloud Platform project Id.
Declaration
public string ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
ForOrganization(String)
Creates a LogTarget instance for sending log entries to an Organization.
Declaration
public static LogTarget ForOrganization(string organizationId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | organizationId |
Returns
| Type | Description |
|---|---|
| LogTarget |
ForProject(String)
Declaration
public static LogTarget ForProject(string projectId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | projectId |
Returns
| Type | Description |
|---|---|
| LogTarget |
GetFullLogName(String)
Gets the full log name. See: https://cloud.google.com/logging/docs/api/reference/rest/v2/LogEntry.
Declaration
public string GetFullLogName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the log which will be used with the project or organization to create a full log name. |
Returns
| Type | Description |
|---|---|
| System.String |