FakeHostingExtensions.AddFakeLoggingOutputSink 方法

定义

添加对每个日志消息调用的操作。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ AddFakeLoggingOutputSink(Microsoft::Extensions::Hosting::IHostBuilder ^ builder, Action<System::String ^> ^ callback);
public static Microsoft.Extensions.Hosting.IHostBuilder AddFakeLoggingOutputSink (this Microsoft.Extensions.Hosting.IHostBuilder builder, Action<string> callback);
static member AddFakeLoggingOutputSink : Microsoft.Extensions.Hosting.IHostBuilder * Action<string> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function AddFakeLoggingOutputSink (builder As IHostBuilder, callback As Action(Of String)) As IHostBuilder

参数

builder
IHostBuilder

一个 IHostBuilder 实例。

callback
Action<String>

要对每个日志消息调用的操作。

返回

IHostBuilder 实例。

适用于