Class GoogleLoggerFactoryExtensions (4.4.0)

[Obsolete("Use Google.Cloud.Diagnostics.Common.LoggingExtensions methods instead.")]
public static class GoogleLoggerFactoryExtensions

Extensions to add GoogleLoggerProviders to an ILoggerFactory.

Inheritance

Object > GoogleLoggerFactoryExtensions

Namespace

Google.Cloud.Diagnostics.AspNetCore

Assembly

Google.Cloud.Diagnostics.AspNetCore.dll

Remarks

Logs to Google Cloud Logging. Docs: https://cloud.google.com/logging/docs/

Methods

AddGoogle(ILoggerFactory, LogTarget, IServiceProvider, LoggerOptions, LoggingServiceV2Client)

[Obsolete("Use Google.Cloud.Diagnostics.Common.LoggingExtensions methods instead.")]
public static ILoggerFactory AddGoogle(this ILoggerFactory factory, LogTarget logTarget, IServiceProvider serviceProvider, LoggerOptions options = null, LoggingServiceV2Client client = null)
Parameters
Name Description
factory ILoggerFactory

The logger factory. Must not be null.

logTarget LogTarget

Where to log to. Must not be null.

serviceProvider IServiceProvider

The service provider to resolve additional services from.

options LoggerOptions

Optional, options for the logger.

client LoggingServiceV2Client

Optional, logging client.

Returns
Type Description
ILoggerFactory

AddGoogle(ILoggerFactory, IServiceProvider, String, LoggerOptions, LoggingServiceV2Client)

[Obsolete("Use Google.Cloud.Diagnostics.Common.LoggingExtensions methods instead.")]
public static ILoggerFactory AddGoogle(this ILoggerFactory factory, IServiceProvider serviceProvider, string projectId = null, LoggerOptions options = null, LoggingServiceV2Client client = null)
Parameters
Name Description
factory ILoggerFactory

The logger factory. Must not be null.

serviceProvider IServiceProvider

The service provider to resolve additional services from.

projectId String

Optional if running on Google App Engine or Google Compute Engine. The Google Cloud Platform project ID. If unspecified and running on GAE or GCE the project ID will be detected from the platform.

options LoggerOptions

Optional, options for the logger.

client LoggingServiceV2Client

Optional, logging client.

Returns
Type Description
ILoggerFactory

See Also