From 987363f49b01ce30e50778f31f614e3646c09c5a Mon Sep 17 00:00:00 2001 From: Jennifer Stamm Date: Tue, 13 May 2025 11:54:16 +0200 Subject: [PATCH 1/4] copy 'Log CDS Configuration' into observability --- java/operating-applications/observability.md | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index 9e7e92c5d..e3128e09f 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -166,6 +166,34 @@ Most of the loggers are used on DEBUG level by default as they produce quite som Spring comes with its own [standard logger groups](https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/html/boot-features-logging.html#boot-features-custom-log-groups). For instance, `web` is useful to track HTTP requests. However, HTTP access logs gathered by the Cloud Foundry platform router are also available in the application log. ::: +#### Log CDS Configuration + +Upon start-up, you can get an overview of the configured [CDS properties](../java/developing-applications/properties). Turn on by setting the log level for `com.sap.cds.properties` to `DEBUG` in the _application.yaml_ file: + +::: code-group +```yaml [srv/src/main/resources/application.yaml] +logging: + level: + com.sap.cds.properties: DEBUG # [!code highlight] +``` +::: + +::: details Sample output: + +```sh +... DEBUG ... com.sap.cds.properties : 'cds.dataSource.autoConfig.enabled': 'false' (default: 'true') +... DEBUG ... com.sap.cds.properties : 'cds.dataSource.embedded': 'true' (default: 'false') +... WARN ... com.sap.cds.properties : 'cds.security.authorization.emptyAttributeValuesAreRestricted': 'false' (default: 'true', deprecated, not documented) +... DEBUG ... com.sap.cds.properties : 'cds.security.mock.users.admin.name': 'admin' +... DEBUG ... com.sap.cds.properties : 'cds.security.mock.users.admin.password': '***' (sensitive) +... DEBUG ... com.sap.cds.properties : 'cds.security.mock.users.admin.roles[0]': 'admin' +... DEBUG ... com.sap.cds.properties : 'cds.security.mock.users.admin.roles[1]': 'cds.Developer' +... DEBUG ... com.sap.cds.properties : 'cds.security.mock.users.admin.attributes.businessPartner[0]': '10401010' +... DEBUG ... com.sap.cds.properties : 'cds.odataV4.endpoint.path': '/api' (default: '/odata/v4') +... DEBUG ... com.sap.cds.properties : 'cds.errors.defaultTranslations.enabled': 'true' (default: 'false') +``` +::: + ### Logging Service { #logging-service} The SAP BTP platform offers the [SAP Application Logging service for SAP BTP](https://help.sap.com/docs/r/product/APPLICATION_LOGGING) From fc0b49b3645cf2086bac6f5c2e259d2c1fb11679 Mon Sep 17 00:00:00 2001 From: Jennifer Stamm Date: Tue, 13 May 2025 11:59:32 +0200 Subject: [PATCH 2/4] remove link --- java/operating-applications/observability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index e3128e09f..4638ae732 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -168,7 +168,7 @@ Spring comes with its own [standard logger groups](https://docs.spring.io/spring #### Log CDS Configuration -Upon start-up, you can get an overview of the configured [CDS properties](../java/developing-applications/properties). Turn on by setting the log level for `com.sap.cds.properties` to `DEBUG` in the _application.yaml_ file: +Upon start-up, you can get an overview of the configured CDS properties. Turn on by setting the log level for `com.sap.cds.properties` to `DEBUG` in the _application.yaml_ file: ::: code-group ```yaml [srv/src/main/resources/application.yaml] From 278dfb89fe44cd2ca2fda898b76699b2327d228c Mon Sep 17 00:00:00 2001 From: Jennifer Stamm Date: Wed, 14 May 2025 10:53:45 +0200 Subject: [PATCH 3/4] explicitly list the benefits of turning on cds properties logging --- java/operating-applications/observability.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index 4638ae732..c33339804 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -168,7 +168,14 @@ Spring comes with its own [standard logger groups](https://docs.spring.io/spring #### Log CDS Configuration -Upon start-up, you can get an overview of the configured CDS properties. Turn on by setting the log level for `com.sap.cds.properties` to `DEBUG` in the _application.yaml_ file: +Upon start-up, you can get an overview of the configured CDS properties. Use this feature to: +- list all accepted CDS properties and double-check the running configuration +- check for warnings of usage of deprecated properties +- check for warnings of usage of undocumented properties + +Please note that secrets are masked. + +Turn it on by setting the log level for `com.sap.cds.properties` to `DEBUG` in the _application.yaml_ file: ::: code-group ```yaml [srv/src/main/resources/application.yaml] From 658db22fdbe64e4e01fb960361517c8c7e115cc0 Mon Sep 17 00:00:00 2001 From: JenniferStamm Date: Mon, 2 Jun 2025 15:50:38 +0200 Subject: [PATCH 4/4] Update java/operating-applications/observability.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: René Jeglinsky --- java/operating-applications/observability.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/java/operating-applications/observability.md b/java/operating-applications/observability.md index c33339804..863d47c9f 100644 --- a/java/operating-applications/observability.md +++ b/java/operating-applications/observability.md @@ -175,15 +175,8 @@ Upon start-up, you can get an overview of the configured CDS properties. Use thi Please note that secrets are masked. -Turn it on by setting the log level for `com.sap.cds.properties` to `DEBUG` in the _application.yaml_ file: +Turn it on by setting the log level com.sap.cds.properties = DEBUG. -::: code-group -```yaml [srv/src/main/resources/application.yaml] -logging: - level: - com.sap.cds.properties: DEBUG # [!code highlight] -``` -::: ::: details Sample output: