[Obsolete("Use Google.Cloud.Diagnostics.Common.LoggingExtensions methods instead.")]
public static class GoogleLoggerFactoryExtensions
Extensions to add GoogleLoggerProviders to an ILoggerFactory.
Namespace
Google.Cloud.Diagnostics.AspNetCore3Assembly
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)
Adds a GoogleLoggerProvider for GoogleLoggers.
Name | Description |
factory | ILoggerFactory The logger factory. Must not be null. |
logTarget | Google.Cloud.Diagnostics.Common.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. |
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)
Adds a GoogleLoggerProvider for GoogleLoggers.
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. |
Type | Description |
ILoggerFactory |