Class GoogleLoggerFactoryExtensions (4.3.1)

[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.AspNetCore3

Assembly

Google.Cloud.Diagnostics.AspNetCore3.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
NameDescription
factoryILoggerFactory

The logger factory. Must not be null.

logTargetLogTarget

Where to log to. Must not be null.

serviceProviderIServiceProvider

The service provider to resolve additional services from.

optionsLoggerOptions

Optional, options for the logger.

clientLoggingServiceV2Client

Optional, logging client.

Returns
TypeDescription
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
NameDescription
factoryILoggerFactory

The logger factory. Must not be null.

serviceProviderIServiceProvider

The service provider to resolve additional services from.

projectIdString

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.

optionsLoggerOptions

Optional, options for the logger.

clientLoggingServiceV2Client

Optional, logging client.

Returns
TypeDescription
ILoggerFactory

See Also