Skip to content

Commit

Permalink
More verbose with fewer gs
Browse files Browse the repository at this point in the history
  • Loading branch information
tymtam2 committed Sep 22, 2023
1 parent 17699ef commit cc3bbd6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -345,6 +345,8 @@ QuestionAnsweringClientOptions options = new()
};

QuestionAnsweringClient client = new(endpoint, credential, options);

using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
```

## Next steps
Expand Down
9 changes: 5 additions & 4 deletions api/overview/azure/latest/ai.textanalytics-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -778,6 +777,8 @@ TextAnalyticsClientOptions options = new()
};

TextAnalyticsClient client = new(endpoint, credential, options);

using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
```

## Next steps
Expand Down
10 changes: 6 additions & 4 deletions api/overview/azure/preview/ai.contentsafety-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
{
Expand All @@ -382,6 +382,8 @@ ContentSafetyClientOptions options = new ()
};

ContentSafetyClient client = new(endpoint, credential, options);

using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
```

## Next steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -303,6 +303,8 @@ QuestionAnsweringClientOptions options = new()
};

QuestionAnsweringClient client = new(endpoint, credential, options);

using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
```

## Next steps
Expand Down
10 changes: 5 additions & 5 deletions api/overview/azure/preview/ai.textanalytics-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -768,6 +767,8 @@ TextAnalyticsClientOptions options = new()
};

TextAnalyticsClient client = new(endpoint, credential, options);

using AzureEventSourceListener listener = AzureEventSourceListener.CreateTraceLogger(level: EventLevel.Verbose);
```

## Next steps
Expand Down Expand Up @@ -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:[email protected]

0 comments on commit cc3bbd6

Please sign in to comment.