LoggingServiceCollectionExtensions.AddLogging Метод

Определение

Перегрузки

AddLogging(IServiceCollection)

Добавляет службы ведения журнала в указанную коллекцию IServiceCollection.Adds logging services to the specified IServiceCollection.

AddLogging(IServiceCollection, Action<ILoggingBuilder>)

Добавляет службы ведения журнала в указанную коллекцию IServiceCollection.Adds logging services to the specified IServiceCollection.

AddLogging(IServiceCollection)

Добавляет службы ведения журнала в указанную коллекцию IServiceCollection.Adds logging services to the specified IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddLogging(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddLogging (services As IServiceCollection) As IServiceCollection

Параметры

services
IServiceCollection

Коллекция IServiceCollection, в которую добавляются службы.The IServiceCollection to add services to.

Возвращаемое значение

IServiceCollection

IServiceCollection для объединения дополнительных вызовов в цепочку.The IServiceCollection so that additional calls can be chained.

Применяется к

AddLogging(IServiceCollection, Action<ILoggingBuilder>)

Добавляет службы ведения журнала в указанную коллекцию IServiceCollection.Adds logging services to the specified IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddLogging(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Logging::ILoggingBuilder ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddLogging (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Logging.ILoggingBuilder> configure);
static member AddLogging : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Logging.ILoggingBuilder> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddLogging (services As IServiceCollection, configure As Action(Of ILoggingBuilder)) As IServiceCollection

Параметры

services
IServiceCollection

Коллекция IServiceCollection, в которую добавляются службы.The IServiceCollection to add services to.

configure
Action<ILoggingBuilder>

Делегат конфигурации ILoggingBuilder.The ILoggingBuilder configuration delegate.

Возвращаемое значение

IServiceCollection

IServiceCollection для объединения дополнительных вызовов в цепочку.The IServiceCollection so that additional calls can be chained.

Применяется к