共用方式為


WebHostBuilder.UseLoggerFactory(ILoggerFactory) 方法

定義

ILoggerFactory指定 Web 主機要使用的 。

public:
 virtual Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseLoggerFactory(Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public Microsoft.AspNetCore.Hosting.IWebHostBuilder UseLoggerFactory (Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
abstract member UseLoggerFactory : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
override this.UseLoggerFactory : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
Public Function UseLoggerFactory (loggerFactory As ILoggerFactory) As IWebHostBuilder

參數

loggerFactory
ILoggerFactory

要使用的 ILoggerFactory

傳回

IWebHostBuilder

實作

適用於