[template] Make README Logging section consistent (#14022)

* [template] Make README Logging section consistent

We might have introduced the inconsistency for some libraries while copying
content from other languages.

* Update other README files

Contents for messaging libraries (Event Hub/Service Bus) remain unchanges
because they are different in having additional information about `rhea`
logging.

* linking to logger
This commit is contained in:
Jeremy Meng 2021-03-01 09:42:22 -08:00 коммит произвёл GitHub
Родитель f540b4ed9e
Коммит 3738fa358d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
15 изменённых файлов: 58 добавлений и 50 удалений

Просмотреть файл

@ -157,16 +157,18 @@ More Samples can be found [here](https://github.com/Azure/azure-sdk-for-js/tree/
## Troubleshooting
### Enable logs
### Logging
You can set the following environment variable to see debug logs when using this library.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
- Getting debug logs from the Azure Anomaly Detector client library
```javascript
import { setLogLevel } from "@azure/logger";
```bash
export DEBUG=azure*
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
## Next steps
Please take a look at the

Просмотреть файл

@ -28,16 +28,18 @@ This SDK provides the following functionality for the Microsoft Azure Attestatio
## Troubleshooting
### Enable logs
### Logging
You can set the following environment variable to get the debug logging output when using this library.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
- Getting debug logs from the Azure Attestation client library
```javascript
import { setLogLevel } from "@azure/logger";
```bash
export AZURE_LOG_LEVEL=verbose
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
## Next steps
## Contributing

Просмотреть файл

@ -31,7 +31,7 @@ Some of the key features of Azure Core AMQP library are:
The core-amqp library depends on the [rhea-promise](https://github.com/amqp/rhea-promise) library for managing connections, and for sending and receiving events over the [AMQP](https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-complete-v1.0-os.pdf) protocol.
### Enable logs
### Logging
You can set the `AZURE_LOG_LEVEL` environment variable to one of the following values to enable logging to `stderr`:

Просмотреть файл

@ -60,7 +60,7 @@ You will be able to find some working examples of an implementation of an operat
## Troubleshooting
### Enable logs
### Logging
Logs can be added at the discretion of the library implementing the Long Running Operation poller.
Packages inside of [azure-sdk-for-js](https://github.com/Azure/azure-sdk-for-js) use

Просмотреть файл

@ -124,7 +124,7 @@ directory for detailed examples on how to use this library.
## Troubleshooting
### Enable logs
### Logging
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:

Просмотреть файл

@ -266,14 +266,14 @@ receiver.subscribe({
## Troubleshooting
### Enable logs
### Logging
You can set the following environment variable to get the debug logging output when using this library.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
- Getting debug logs from the Azure Event Grid client library
```javascript
import { setLogLevel } from "@azure/logger";
```bash
export AZURE_LOG_LEVEL=verbose
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).

Просмотреть файл

@ -450,7 +450,7 @@ main();
The Event Hubs library depends on the [rhea-promise](https://github.com/amqp/rhea-promise) library for managing connections, sending and receiving events over the [AMQP](https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-complete-v1.0-os.pdf) protocol.
### Enable logs
### Logging
You can set the `AZURE_LOG_LEVEL` environment variable to enable logging to `stderr`:

Просмотреть файл

@ -140,7 +140,7 @@ main();
## Troubleshooting
### Enable logs
### Logging
You can set the `AZURE_LOG_LEVEL` environment variable to one of the following values to enable logging to `stderr`:

Просмотреть файл

@ -435,14 +435,14 @@ main().catch((err) => {
## Troubleshooting
### Enable logs
### Logging
You can set the following environment variable to see debug logs when using this library.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
- Getting debug logs from the Azure Form Recognizer client library
```javascript
import { setLogLevel } from "@azure/logger";
```bash
export DEBUG=azure*
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).

Просмотреть файл

@ -472,16 +472,18 @@ async function queryAnomaliesByAlert(client, alert) {
## Troubleshooting
### Enable logs
### Logging
You can set the following environment variable to see debug logs when using this library.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
- Getting debug logs from the Azure MetricsAdvisor client library
```javascript
import { setLogLevel } from "@azure/logger";
```bash
export DEBUG=azure*
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
## Next steps
Please take a look at the

Просмотреть файл

@ -159,11 +159,9 @@ documentation for the client library you're using to determine if and how this m
## Troubleshooting
### Enable logs
### Logging
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and
responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at
runtime by calling `setLogLevel` in the `@azure/logger`:
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
```javascript
import { setLogLevel } from "@azure/logger";
@ -171,6 +169,8 @@ import { setLogLevel } from "@azure/logger";
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
## Next steps
Please take a look at the

Просмотреть файл

@ -425,14 +425,14 @@ When retrieving results, a `facets` property will be available that will indicat
## Troubleshooting
### Enable logs
### Logging
You can set the following environment variable to get the debug logs when using this library.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
- Getting debug logs from the Azure Cognitive Search client library
```javascript
import { setLogLevel } from "@azure/logger";
```bash
export AZURE_LOG_LEVEL=verbose*
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).

Просмотреть файл

@ -366,7 +366,7 @@ await serviceBusAdministrationClient.deleteQueue(queueName);
The Service Bus library depends on the [rhea-promise](https://github.com/amqp/rhea-promise) library for managing connections, sending and receiving messages over the [AMQP](https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-complete-v1.0-os.pdf) protocol.
### Enable logs
### Logging
You can set the following environment variable to get the debug logs when using this library.

Просмотреть файл

@ -74,16 +74,18 @@ Create several code examples for how someone would use your library to accomplis
## Troubleshooting
### Enable logs
### Logging
You can set the following environment variable to see debug logs when using this library.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
- Getting debug logs from the Azure TextAnalytics client library
```javascript
import { setLogLevel } from "@azure/logger";
```bash
export DEBUG=azure*
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).
## Next steps
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/template/template/samples) directory for detailed examples that demonstrate how to use the client libraries.

Просмотреть файл

@ -505,14 +505,14 @@ main();
## Troubleshooting
### Enable logs
### Logging
You can set the following environment variable to get the debug logging output when using this library.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
- Getting debug logs from the Azure Text Analytics client library
```javascript
import { setLogLevel } from "@azure/logger";
```bash
export AZURE_LOG_LEVEL=verbose
setLogLevel("info");
```
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).