Skip to content

Commit cc3bbd6

Browse files
committedSep 22, 2023
More verbose with fewer gs
1 parent 17699ef commit cc3bbd6

5 files changed

+26
-19
lines changed
 

‎api/overview/azure/latest/ai.language.questionanswering-readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole
331331

332332
To learn more about other logging mechanisms see [here][core_logging].
333333

334-
#### Loggging request and response content
334+
#### Logging request and response content
335335

336-
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client.
336+
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose.
337337

338-
```
338+
```C#
339339
QuestionAnsweringClientOptions options = new()
340340
{
341341
Diagnostics =
@@ -345,6 +345,8 @@ QuestionAnsweringClientOptions options = new()
345345
};
346346

347347
QuestionAnsweringClient client = new(endpoint, credential, options);
348+
349+
using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
348350
```
349351

350352
## Next steps

‎api/overview/azure/latest/ai.textanalytics-readme.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,12 +763,11 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole
763763

764764
To learn more about other logging mechanisms see [here][logging].
765765

766-
#### Loggging request and response content
766+
#### Logging request and response content
767767

768-
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client.
768+
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose.
769769

770-
771-
```
770+
```C#
772771
TextAnalyticsClientOptions options = new()
773772
{
774773
Diagnostics =
@@ -778,6 +777,8 @@ TextAnalyticsClientOptions options = new()
778777
};
779778

780779
TextAnalyticsClient client = new(endpoint, credential, options);
780+
781+
using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
781782
```
782783

783784
## Next steps

‎api/overview/azure/preview/ai.contentsafety-readme.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,12 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole
368368

369369
To learn more about other logging mechanisms see [Diagnostics Samples][logging].
370370

371-
#### Loggging request and response content
371+
#### Logging request and response content
372372

373-
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client.
373+
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose.
374374

375-
```
376-
ContentSafetyClientOptions options = new ()
375+
```C#
376+
ContentSafetyClientOptions options = new()
377377
{
378378
Diagnostics =
379379
{
@@ -382,6 +382,8 @@ ContentSafetyClientOptions options = new ()
382382
};
383383

384384
ContentSafetyClient client = new(endpoint, credential, options);
385+
386+
using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
385387
```
386388

387389
## Next steps

‎api/overview/azure/preview/ai.language.questionanswering-readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole
289289

290290
To learn more about other logging mechanisms see [here][core_logging].
291291

292-
#### Loggging request and response content
292+
#### Logging request and response content
293293

294-
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client.
294+
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose.
295295

296-
```
296+
```C#
297297
QuestionAnsweringClientOptions options = new()
298298
{
299299
Diagnostics =
@@ -303,6 +303,8 @@ QuestionAnsweringClientOptions options = new()
303303
};
304304

305305
QuestionAnsweringClient client = new(endpoint, credential, options);
306+
307+
using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
306308
```
307309

308310
## Next steps

‎api/overview/azure/preview/ai.textanalytics-readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -753,12 +753,11 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole
753753

754754
To learn more about other logging mechanisms see [here][logging].
755755

756-
#### Loggging request and response content
756+
#### Logging request and response content
757757

758-
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client.
758+
To log the content of requests and responses set `IsLoggingContentEnabled` to true when creating the client and set the log level to verbose.
759759

760-
761-
```
760+
```C#
762761
TextAnalyticsClientOptions options = new()
763762
{
764763
Diagnostics =
@@ -768,6 +767,8 @@ TextAnalyticsClientOptions options = new()
768767
};
769768

770769
TextAnalyticsClient client = new(endpoint, credential, options);
770+
771+
using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
771772
```
772773

773774
## Next steps
@@ -870,4 +871,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
870871
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
871872
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
872873
[coc_contact]: mailto:opencode@microsoft.com
873-

0 commit comments

Comments
 (0)