Class LoggingServiceOptions (4.3.1)

public sealed class LoggingServiceOptions

Configuration for initializing Google Cloud Logging.

Inheritance

Object > LoggingServiceOptions

Namespace

Google.Cloud.Diagnostics.Common

Assembly

Google.Cloud.Diagnostics.Common.dll

Properties

Client

public LoggingServiceV2Client Client { get; set; }

A client to log entries with. May be null.

Property Value
TypeDescription
LoggingServiceV2Client

LoggerDiagnosticsOutput

public TextWriter LoggerDiagnosticsOutput { get; set; }

A TextWriter to write diagnostics info about loggers created with these LoggingOptions. Currently the only diagnostics info we provide is the URL where the logs written with these options can be found.

Property Value
TypeDescription
TextWriter

LogTarget

public LogTarget LogTarget { get; set; }

Where to log to. May represent a Google Project or Organization. May be set by setting ProjectId. May be null if running on Google Cloud in which case the Google Cloud Platform project ID will be detected from the platform and used to build the log target.

Property Value
TypeDescription
LogTarget

Options

public LoggingOptions Options { get; set; }

Options for logging. May be null.

Property Value
TypeDescription
LoggingOptions

ProjectId

public string ProjectId { get; set; }

The Google Cloud Project ID to store the logs in. May be null if running on Google Cloud, in which case, and if LogTarget is also null the project ID will be detected from the platform and used to build the log target. This is an alternate way to set LogTarget for Project.

Property Value
TypeDescription
String

ServiceName

public string ServiceName { get; set; }

An identifier of the service, such as the name of the executable or job. May be null. When set, it will be included in the

serviceContext
field of the log entry JSON payload.

Property Value
TypeDescription
String

Version

public string Version { get; set; }

A string that represents the version of the service or the source code that logs are written for. When set, it will be included in the

serviceContext
field of the log entry JSON payload.

Property Value
TypeDescription
String