Class LoggingExtensions

public static class LoggingExtensions

Extension methods for registering Google Cloud Logging.

Inheritance

Object > LoggingExtensions

Namespace

Google.Cloud.Diagnostics.Common

Assembly

Google.Cloud.Diagnostics.Common.dll

Methods

AddGoogle(ILoggingBuilder, LoggingServiceOptions)

public static ILoggingBuilder AddGoogle(this ILoggingBuilder builder, LoggingServiceOptions options = null)
Parameters
NameDescription
builderILoggingBuilder
optionsLoggingServiceOptions
Returns
TypeDescription
ILoggingBuilder

AddLogEntryLabelProviderSingleton<T>(IServiceCollection)

public static IServiceCollection AddLogEntryLabelProviderSingleton<T>(this IServiceCollection services)
    where T : class, ILogEntryLabelProvider

Adds a ILogEntryLabelProvider of type T to the service collection instance as a singleton.

Parameter
NameDescription
servicesIServiceCollection

The IServiceCollection instance.

Returns
TypeDescription
IServiceCollection

The IServiceCollection instance.

Type Parameter
NameDescription
T

The type of the ILogEntryLabelProvider implementation.

AddLogEntryLabelProviderSingleton<T>(IServiceCollection, T)

public static IServiceCollection AddLogEntryLabelProviderSingleton<T>(this IServiceCollection services, T instance)
    where T : class, ILogEntryLabelProvider

Adds a ILogEntryLabelProvider of type T to the service collection instance as a singleton.

Parameters
NameDescription
servicesIServiceCollection

The IServiceCollection instance.

instanceT

The instance of T.

Returns
TypeDescription
IServiceCollection

The IServiceCollection instance.

Type Parameter
NameDescription
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, ILogEntryLabelProvider

Adds a ILogEntryLabelProvider of type T to the service collection instance as a singleton.

Parameters
NameDescription
servicesIServiceCollection

The IServiceCollection instance.

implementationFactoryFunc<IServiceProvider, T>

The factory that creates the service.

Returns
TypeDescription
IServiceCollection

The IServiceCollection instance.

Type Parameter
NameDescription
T

The type of the ILogEntryLabelProvider implementation.