Skip to content

Commit e0bebbc

Browse files
Modify the log part of the readme in the spring directory. (Azure#23859)
1 parent 189bcc0 commit e0bebbc

File tree

25 files changed

+139
-303
lines changed
  • sdk
    • appconfiguration/azure-spring-cloud-starter-appconfiguration-config
    • spring
      • azure-spring-boot-starter-active-directory-b2c
      • azure-spring-boot-starter-active-directory
      • azure-spring-boot-starter-cosmos
      • azure-spring-boot-starter-keyvault-certificates
      • azure-spring-boot-starter-keyvault-secrets
      • azure-spring-boot-starter-servicebus-jms
      • azure-spring-boot-starter-storage
      • azure-spring-boot-starter
      • azure-spring-boot
      • azure-spring-cloud-autoconfigure
      • azure-spring-cloud-context
      • azure-spring-cloud-starter-cache
      • azure-spring-cloud-starter-eventhubs-kafka
      • azure-spring-cloud-starter-eventhubs
      • azure-spring-cloud-starter-servicebus
      • azure-spring-cloud-starter-storage-queue
      • azure-spring-cloud-storage
      • azure-spring-cloud-stream-binder-eventhubs
      • azure-spring-cloud-stream-binder-servicebus-core
      • azure-spring-cloud-stream-binder-servicebus-queue
      • azure-spring-cloud-stream-binder-servicebus-topic
      • azure-spring-integration-eventhubs
      • azure-spring-integration-servicebus
      • azure-spring-integration-storage-queue

25 files changed

+139
-303
lines changed

sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -309,23 +309,17 @@ public class MyClient implements ConfigurationClientBuilderSetup, SecretClientBu
309309
```
310310

311311
## Troubleshooting
312-
### Enable client logging
313-
Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging.
312+
### Logging setting
313+
Please refer to [spring logging document] to get more information about logging.
314314

315-
### Enable Spring logging
316-
Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.<logger-name>=<level>` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root.
317-
318-
The following example shows potential logging settings in `application.properties`:
319-
320-
```properties
315+
#### Logging setting examples
316+
- Example: Setting logging level of hibernate
317+
```
321318
logging.level.root=WARN
322319
logging.level.org.springframework.web=DEBUG
323320
logging.level.org.hibernate=ERROR
324321
```
325322

326-
For more information about setting logging in spring, please refer to the [official doc][logging_doc].
327-
328-
329323
## Next steps
330324

331325
The following section provide a sample project illustrating how to use the starter.
@@ -344,9 +338,8 @@ Please follow [instructions here][contributing_md] to build from source or contr
344338
[app_configuration_sample]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/tag_azure-spring-boot_3.6.0/appconfiguration/azure-appconfiguration-sample
345339
[app_configuration_conversation_complete_sample]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/tag_azure-spring-boot_3.6.0/appconfiguration/azure-appconfiguration-conversion-sample-complete
346340
[app_configuration_conversation_initail_sample]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/tag_azure-spring-boot_3.6.0/appconfiguration/azure-appconfiguration-conversion-sample-initial
347-
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
348341
[azure_subscription]: https://azure.microsoft.com/free
349-
[logging_doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
342+
[spring logging document]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
350343
[contributing_md]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/CONTRIBUTING.md
351344
[maven]: https://maven.apache.org/
352345
[spring_conversion_duration]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config.typesafe-configuration-properties.conversion.durations

sdk/spring/azure-spring-boot-starter-active-directory-b2c/README.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -474,26 +474,18 @@ Please refer to [azure-spring-boot-sample-active-directory-b2c-oidc].
474474
Please refer to [azure-spring-boot-sample-active-directory-b2c-resource-server].
475475

476476
## Troubleshooting
477-
### Enable client logging
478-
Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging.
479-
480-
### Enable Spring logging
481-
Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.<logger-name>=<level>` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root.
482-
483-
The following example shows potential logging settings in `application.properties`:
477+
### Logging setting
478+
Please refer to [spring logging document] to get more information about logging.
484479

480+
#### Logging setting examples
481+
- Example 1: Setting logging level of hibernate
485482
```properties
486483
logging.level.root=WARN
487484
logging.level.org.springframework.web=DEBUG
488485
logging.level.org.hibernate=ERROR
489486
```
490487

491-
For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging).
492-
493-
### Enable authority logging.
494-
495-
Add the following logging settings:
496-
488+
- Example 2: Setting logging level of AADJwtGrantedAuthoritiesConverter
497489
```properties
498490
# logging settings for resource server scenario.
499491
logging.level.com.azure.spring.aad.AADJwtGrantedAuthoritiesConverter=DEBUG
@@ -519,7 +511,7 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
519511
[refdocs]: https://azure.github.io/azure-sdk-for-java/springboot.html#azure-spring-boot
520512
[package]: https://mvnrepository.com/artifact/com.azure.spring/azure-spring-boot-starter-active-directory-b2c
521513
[sample]: https://github.com/Azure-Samples/azure-spring-boot-samples
522-
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
514+
[spring logging document]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
523515
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
524516
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#add-azure-spring-boot-bom
525517
[tutorial_create_tenant]: https://docs.microsoft.com/azure/active-directory-b2c/tutorial-create-tenant

sdk/spring/azure-spring-boot-starter-active-directory/README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -733,26 +733,18 @@ Please refer to [azure-spring-boot-sample-active-directory-resource-server].
733733
Please refer to [azure-spring-boot-sample-active-directory-resource-server-obo].
734734

735735
## Troubleshooting
736-
### Enable client logging
737-
Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging.
738-
739-
### Enable Spring logging
740-
Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.<logger-name>=<level>` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root.
741-
742-
The following example shows potential logging settings in `application.properties`:
736+
### Logging setting
737+
Please refer to [spring logging document] to get more information about logging.
743738

739+
#### Logging setting examples
740+
- Example 1: Setting logging level of hibernate
744741
```properties
745742
logging.level.root=WARN
746743
logging.level.org.springframework.web=DEBUG
747744
logging.level.org.hibernate=ERROR
748745
```
749746

750-
For more information about setting logging in spring, please refer to the [official doc].
751-
752-
### Enable authority logging.
753-
754-
Add the following logging settings:
755-
747+
- Example 2: Setting logging level of AADJwtGrantedAuthoritiesConverter
756748
```properties
757749
# logging settings for web application scenario.
758750
logging.level.com.azure.spring.aad.webapp.AADOAuth2UserService=DEBUG
@@ -800,8 +792,7 @@ Please follow [instructions here] to build from source or contribute.
800792
[graph-api-list-member-of]: https://docs.microsoft.com/graph/api/user-list-memberof?view=graph-rest-1.0
801793
[graph-api-list-transitive-member-of]: https://docs.microsoft.com/graph/api/user-list-transitivememberof?view=graph-rest-1.0
802794
[instructions here]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/CONTRIBUTING.md
803-
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
804-
[official doc]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
795+
[spring logging document]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
805796
[OAuth 2.0 implicit grant flow]: https://docs.microsoft.com/azure/active-directory/develop/v1-oauth2-implicit-grant-flow
806797
[package]: https://mvnrepository.com/artifact/com.azure.spring/azure-spring-boot-starter-active-directory
807798
[refdocs]: https://azure.github.io/azure-sdk-for-java/springboot.html#azure-spring-boot

sdk/spring/azure-spring-boot-starter-cosmos/README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -258,23 +258,17 @@ public class CosmosSampleApplication implements CommandLineRunner {
258258
Autowired UserRepository interface, then can do save, delete and find operations.
259259

260260
## Troubleshooting
261-
### Enable client logging
262-
Azure SDKs for Java offer a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging.
263-
264-
### Enable Spring logging
265-
Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.<logger-name>=<level>` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root.
266-
267-
The following example shows potential logging settings in `application.properties`:
261+
### Logging setting
262+
Please refer to [spring logging document] to get more information about logging.
268263

264+
#### Logging setting examples
265+
- Example: Setting logging level of hibernate
269266
```properties
270267
logging.level.root=WARN
271268
logging.level.org.springframework.web=DEBUG
272269
logging.level.org.hibernate=ERROR
273270
```
274271

275-
For more information about setting loging in pring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging).
276-
277-
278272
## Next steps
279273

280274
Besides using this Azure Cosmos DB Spring Boot Starter, you can directly use Spring Data for Azure Cosmos DB package for more complex scenarios. Please refer to [Spring Data for Azure Cosmos DB](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/cosmos/azure-spring-data-cosmos) for more details.
@@ -293,7 +287,7 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
293287
[refdocs]: https://azure.github.io/azure-sdk-for-java/springboot.html#azure-spring-boot
294288
[package]: https://mvnrepository.com/artifact/com.azure.spring/azure-spring-boot-starter-cosmos
295289
[sample]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/tag_azure-spring-boot_3.6.0/cosmos/azure-spring-boot-sample-cosmos
296-
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
290+
[spring logging document]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
297291
[sample_cosmos_switch_key]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos/SampleApplication.java
298292
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
299293
[Add azure-spring-boot-bom]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/AZURE_SPRING_BOMS_USAGE.md#add-azure-spring-boot-bom

sdk/spring/azure-spring-boot-starter-keyvault-certificates/README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -402,24 +402,17 @@ PEM | EC | P-521 | SHA512withECDSA |
402402
PEM | EC | P-256K | | ✘ |
403403

404404
## Troubleshooting
405-
### Enable client logging
406-
Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging.
407-
408-
### Enable Spring logging
409-
Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.yml) by using `logging.level.<logger-name>=<level>` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root.
410-
411-
The following example shows potential logging settings in `application.yml`:
412-
```yaml
413-
logging:
414-
level:
415-
root: WARN
416-
org:
417-
springframework.web: DEBUG
418-
hibernate: ERROR
405+
### Logging setting
406+
Please refer to [spring logging document] to get more information about logging.
407+
408+
#### Logging setting examples
409+
- Example: Setting logging level of hibernate
410+
```properties
411+
logging.level.root=WARN
412+
logging.level.org.springframework.web=DEBUG
413+
logging.level.org.hibernate=ERROR
419414
```
420415

421-
For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging).
422-
423416
## Next steps
424417
The following section provide a sample project illustrating how to use the starter.
425418
### More sample code
@@ -434,7 +427,7 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
434427
[refdocs]: https://azure.github.io/azure-sdk-for-java/springboot.html#azure-spring-boot
435428
[package]: https://mvnrepository.com/artifact/com.azure.spring/azure-spring-boot-starter-keyvault-certificates
436429
[sample]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/tag_azure-spring-boot_3.6.0/keyvault/azure-spring-boot-sample-keyvault-certificates-server-side
437-
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
430+
[spring logging document]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
438431
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
439432
[non-exportable]: https://docs.microsoft.com/azure/key-vault/certificates/about-certificates#exportable-or-non-exportable-key
440433
[Azure Spring Cloud TLS]: https://docs.microsoft.com/azure/spring-cloud/how-to-enable-end-to-end-tls

sdk/spring/azure-spring-boot-starter-keyvault-secrets/README.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -195,29 +195,17 @@ azure.keyvault.secret-service-version=specify secretServiceVersion value(fill wi
195195

196196

197197
## Troubleshooting
198-
### Enable client logging
199-
Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application
200-
errors and expedite their resolution. The logs produced will capture the flow of an application
201-
before reaching the terminal state to help locate the root issue. View the [logging] wiki for
202-
guidance about enabling logging.
198+
### Logging setting
199+
Please refer to [spring logging document] to get more information about logging.
203200

204-
### Enable Spring logging
205-
Spring allow all the supported logging systems to set logger levels set in the Spring Environment
206-
(for example, in application.properties) by using `logging.level.<logger-name>=<level>` where level
207-
is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by
208-
using logging.level.root.
209-
210-
The following example shows potential logging settings in `application.properties`:
211-
212-
```
201+
#### Logging setting examples
202+
- Example: Setting logging level of hibernate
203+
```properties
213204
logging.level.root=WARN
214205
logging.level.org.springframework.web=DEBUG
215206
logging.level.org.hibernate=ERROR
216207
```
217208

218-
Please refer to [Spring logging documentation] to get more information.
219-
220-
221209
## Next steps
222210

223211
## Contributing
@@ -241,7 +229,6 @@ Please follow [CONTRIBUTING guide] to build from source or contribute.
241229
[Azure AD managed identities for Azure resources documentation]: https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/.
242230
[Set and retrieve a secret from Azure Key Vault using Azure CLI]: https://docs.microsoft.com/azure/key-vault/secrets/quick-create-cli
243231
[Set and retrieve a secret from Azure Key Vault using the Azure portal]: https://docs.microsoft.com/azure/key-vault/secrets/quick-create-portal
244-
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
245232
[Spring logging documentation]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
246233
[SecretServiceVersion]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/SecretServiceVersion.java#L12
247234
[Key Vault Secrets Sample project]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/tag_azure-spring-boot_3.6.0/keyvault/azure-spring-boot-sample-keyvault-secrets

sdk/spring/azure-spring-boot-starter-servicebus-jms/README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,23 +222,18 @@ To solve this issue, you need to add the dependency below into your classpath:
222222
<version>2.3.0</version>
223223
</dependency>
224224
```
225-
### Enable client logging
226-
Azure SDKs for Java offers a consistent logging story to help aid in troubleshooting application errors and expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state to help locate the root issue. View the [logging][logging] wiki for guidance about enabling logging.
227225

228-
### Enable Spring logging
229-
Spring allow all the supported logging systems to set logger levels set in the Spring Environment (for example, in application.properties) by using `logging.level.<logger-name>=<level>` where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. The root logger can be configured by using logging.level.root.
226+
### Logging setting
227+
Please refer to [spring logging document] to get more information about logging.
230228

231-
The following example shows potential logging settings in `application.properties`:
232-
233-
```
229+
#### Logging setting examples
230+
- Example: Setting logging level of hibernate
231+
```properties
234232
logging.level.root=WARN
235233
logging.level.org.springframework.web=DEBUG
236234
logging.level.org.hibernate=ERROR
237235
```
238236

239-
For more information about setting logging in spring, please refer to the [official doc](https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging).
240-
241-
242237
## Next steps
243238
The following section provides sample projects illustrating how to use the starter in different cases.
244239
### More sample code
@@ -256,7 +251,7 @@ Please follow [instructions here](https://github.com/Azure/azure-sdk-for-java/bl
256251
[refdocs]: https://azure.github.io/azure-sdk-for-java/springboot.html#azure-spring-boot
257252
[package]: https://mvnrepository.com/artifact/com.azure.spring/azure-spring-boot-starter-servicebus-jms
258253
[sample]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/main/servicebus/azure-spring-boot-starter-servicebus-jms
259-
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK#use-logback-logging-framework-in-a-spring-boot-application
254+
[spring logging document]: https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#boot-features-logging
260255
[servicebus-message-payloads]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads
261256
[spring_jms_guide]: https://spring.io/guides/gs/messaging-jms/
262257
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist

0 commit comments

Comments
 (0)