public static class LoggingExtensionsExtension methods for registering Google Cloud Logging.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
Google.Cloud.Diagnostics.Common.dll
Methods
AddGoogle(ILoggingBuilder, LoggingServiceOptions)
public static ILoggingBuilder AddGoogle(this ILoggingBuilder builder, LoggingServiceOptions options = null)Adds a GoogleLoggerProvider for GoogleLoggers.
| Parameters | |
|---|---|
| Name | Description |
builder |
ILoggingBuilder |
options |
LoggingServiceOptions |
| Returns | |
|---|---|
| Type | Description |
ILoggingBuilder |
|
AddLogEntryLabelProviderSingleton<T>(IServiceCollection)
public static IServiceCollection AddLogEntryLabelProviderSingleton<T>(this IServiceCollection services)
where T : class, ILogEntryLabelProviderAdds a ILogEntryLabelProvider of type T to the service collection instance
as a singleton.
| Parameter | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe IServiceCollection instance. |
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
The IServiceCollection instance. |
| Type Parameter | |
|---|---|
| Name | Description |
T |
The type of the ILogEntryLabelProvider implementation. |
AddLogEntryLabelProviderSingleton<T>(IServiceCollection, T)
public static IServiceCollection AddLogEntryLabelProviderSingleton<T>(this IServiceCollection services, T instance)
where T : class, ILogEntryLabelProviderAdds a ILogEntryLabelProvider of type T to the service collection instance
as a singleton.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe IServiceCollection instance. |
instance |
TThe instance of |
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
The IServiceCollection instance. |
| Type Parameter | |
|---|---|
| Name | Description |
T |
The type of the ILogEntryLabelProvider implementation. |
AddLogEntryLabelProviderSingleton<T>(IServiceCollection, Func<IServiceProvider, T>)
public static IServiceCollection AddLogEntryLabelProviderSingleton<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory)
where T : class, ILogEntryLabelProviderAdds a ILogEntryLabelProvider of type T to the service collection instance
as a singleton.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe IServiceCollection instance. |
implementationFactory |
Func<IServiceProvider, T>The factory that creates the service. |
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
The IServiceCollection instance. |
| Type Parameter | |
|---|---|
| Name | Description |
T |
The type of the ILogEntryLabelProvider implementation. |