Bagikan melalui


FakeHostingExtensions.AddFakeLoggingOutputSink Metode

Definisi

Menambahkan tindakan yang dipanggil pada setiap pesan log.

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

Parameter

builder
IHostBuilder

Instans IHostBuilder .

callback
Action<String>

Tindakan yang akan dipanggil pada setiap pesan log.

Mengembalikan

Instans IHostBuilder.

Berlaku untuk