Share via


LoggingSpeechToTextClientBuilderExtensions.UseLogging Method

Definition

Adds logging to the audio transcription client pipeline.

public static Microsoft.Extensions.AI.SpeechToTextClientBuilder UseLogging(this Microsoft.Extensions.AI.SpeechToTextClientBuilder builder, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default, Action<Microsoft.Extensions.AI.LoggingSpeechToTextClient>? configure = default);
static member UseLogging : Microsoft.Extensions.AI.SpeechToTextClientBuilder * Microsoft.Extensions.Logging.ILoggerFactory * Action<Microsoft.Extensions.AI.LoggingSpeechToTextClient> -> Microsoft.Extensions.AI.SpeechToTextClientBuilder
<Extension()>
Public Function UseLogging (builder As SpeechToTextClientBuilder, Optional loggerFactory As ILoggerFactory = Nothing, Optional configure As Action(Of LoggingSpeechToTextClient) = Nothing) As SpeechToTextClientBuilder

Parameters

loggerFactory
ILoggerFactory

An optional ILoggerFactory used to create a logger with which logging should be performed. If not supplied, a required instance will be resolved from the service provider.

configure
Action<LoggingSpeechToTextClient>

An optional callback that can be used to configure the LoggingSpeechToTextClient instance.

Returns

The builder.

Remarks

When the employed ILogger enables Trace, the contents of messages and options are logged. These messages and options may contain sensitive application data. Trace is disabled by default and should never be enabled in a production environment. Messages and options are not logged at other logging levels.

Applies to