Google.Cloud.Diagnostics.Common - Class LogTarget (5.1.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

GoogleCloudGoogle.Cloud.DiagnosticsCommon

Assembly

Google.Cloud.Diagnostics.Common.dll

Properties

Kind

public LogTargetKind Kind { get; }

The location to log entries to.

Property Value
TypeDescription
LogTargetKind

OrganizationId

public string OrganizationId { get; }

The Google Cloud Platform organization Id.

Property Value
TypeDescription
string

ProjectId

public string ProjectId { get; }

The Google Cloud Platform project Id.

Property Value
TypeDescription
string

Methods

ForOrganization(string)

public static LogTarget ForOrganization(string organizationId)

Creates a LogTarget instance for sending log entries to an Organization.

Parameter
NameDescription
organizationIdstring
Returns
TypeDescription
LogTarget

ForProject(string)

public static LogTarget ForProject(string projectId)

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

Parameter
NameDescription
projectIdstring
Returns
TypeDescription
LogTarget

GetFullLogName(string)

public string GetFullLogName(string name)
Parameter
NameDescription
namestring

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

Returns
TypeDescription
string