Del via


LoggingTextToSpeechClientBuilderExtensions.UseLogging Method

Definition

Adds logging to the text-to-speech client pipeline.

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

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<LoggingTextToSpeechClient>

An optional callback that can be used to configure the LoggingTextToSpeechClient 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