Google.Cloud.Diagnostics.Common - Class LogTarget (5.2.0)

public sealed class LogTarget

Reference 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.

Inheritance

object > LogTarget

Namespace

Google.Cloud.Diagnostics.Common

Assembly

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)

Creates a LogTarget instance for sending log entries to a Project.

Parameter
Name Description
projectId string
Returns
Type Description
LogTarget

GetFullLogName(string)

public string GetFullLogName(string name)
Parameter
Name Description
name string

The name of the log which will be used with the project or organization to create a full log name.

Returns
Type Description
string