public sealed class LoggingServiceOptions
Configuration for initializing Google Cloud Logging.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
Google.Cloud.Diagnostics.Common.dll
Properties
Client
public LoggingServiceV2Client Client { get; set; }
A client to log entries with. May be null.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
LogTarget |
Options
public LoggingOptions Options { get; set; }
Options for logging. May be null.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
String |