diff --git a/api/overview/azure/latest/ai.language.questionanswering-readme.md b/api/overview/azure/latest/ai.language.questionanswering-readme.md index 360bc1eb0e19..4e8bd9b78e2b 100644 --- a/api/overview/azure/latest/ai.language.questionanswering-readme.md +++ b/api/overview/azure/latest/ai.language.questionanswering-readme.md @@ -331,11 +331,11 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole To learn more about other logging mechanisms see [here][core_logging]. -#### Loggging request and response content +#### Logging request and response content -To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client. +To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose. -``` +```C# QuestionAnsweringClientOptions options = new() { Diagnostics = @@ -345,6 +345,8 @@ QuestionAnsweringClientOptions options = new() }; QuestionAnsweringClient client = new(endpoint, credential, options); + +using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose); ``` ## Next steps diff --git a/api/overview/azure/latest/ai.textanalytics-readme.md b/api/overview/azure/latest/ai.textanalytics-readme.md index 139032a1e3a7..64a7aac022cb 100644 --- a/api/overview/azure/latest/ai.textanalytics-readme.md +++ b/api/overview/azure/latest/ai.textanalytics-readme.md @@ -763,12 +763,11 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole To learn more about other logging mechanisms see [here][logging]. -#### Loggging request and response content +#### Logging request and response content -To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client. +To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose. - -``` +```C# TextAnalyticsClientOptions options = new() { Diagnostics = @@ -778,6 +777,8 @@ TextAnalyticsClientOptions options = new() }; TextAnalyticsClient client = new(endpoint, credential, options); + +using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose); ``` ## Next steps diff --git a/api/overview/azure/preview/ai.contentsafety-readme.md b/api/overview/azure/preview/ai.contentsafety-readme.md index 3053b7b6243e..7c6761d57af7 100644 --- a/api/overview/azure/preview/ai.contentsafety-readme.md +++ b/api/overview/azure/preview/ai.contentsafety-readme.md @@ -368,12 +368,12 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole To learn more about other logging mechanisms see [Diagnostics Samples][logging]. -#### Loggging request and response content +#### Logging request and response content -To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client. +To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose. -``` -ContentSafetyClientOptions options = new () +```C# +ContentSafetyClientOptions options = new() { Diagnostics = { @@ -382,6 +382,8 @@ ContentSafetyClientOptions options = new () }; ContentSafetyClient client = new(endpoint, credential, options); + +using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose); ``` ## Next steps diff --git a/api/overview/azure/preview/ai.language.questionanswering-readme.md b/api/overview/azure/preview/ai.language.questionanswering-readme.md index f3b6ed6654c7..9833b123d54d 100644 --- a/api/overview/azure/preview/ai.language.questionanswering-readme.md +++ b/api/overview/azure/preview/ai.language.questionanswering-readme.md @@ -289,11 +289,11 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole To learn more about other logging mechanisms see [here][core_logging]. -#### Loggging request and response content +#### Logging request and response content -To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client. +To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose. -``` +```C# QuestionAnsweringClientOptions options = new() { Diagnostics = @@ -303,6 +303,8 @@ QuestionAnsweringClientOptions options = new() }; QuestionAnsweringClient client = new(endpoint, credential, options); + +using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose); ``` ## Next steps diff --git a/api/overview/azure/preview/ai.textanalytics-readme.md b/api/overview/azure/preview/ai.textanalytics-readme.md index 41e413a0415c..6e054d9f01d3 100644 --- a/api/overview/azure/preview/ai.textanalytics-readme.md +++ b/api/overview/azure/preview/ai.textanalytics-readme.md @@ -753,12 +753,11 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole To learn more about other logging mechanisms see [here][logging]. -#### Loggging request and response content +#### Logging request and response content -To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client. +To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose. - -``` +```C# TextAnalyticsClientOptions options = new() { Diagnostics = @@ -768,6 +767,8 @@ TextAnalyticsClientOptions options = new() }; TextAnalyticsClient client = new(endpoint, credential, options); + +using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose); ``` ## Next steps @@ -870,4 +871,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ [coc_contact]: mailto:opencode@microsoft.com -