Copilot commented on code in PR #15997:
URL: https://github.com/apache/grails-core/pull/15997#discussion_r3605144302


##########
grails-doc/src/en/guide/conf/config/logging.adoc:
##########
@@ -30,3 +30,73 @@ NOTE: The filename `logback.xml` still works but 
`logback-spring.xml` is now rec
 
 More information can be found in the official 
https://logback.qos.ch/documentation.html[Logback documentation].
 
+=== Structured Logging
+
+Grails does not enable structured logging. Existing Logback configuration and 
plain-text output remain unchanged
+unless an application explicitly selects a Spring Boot structured format. 
Spring Boot 4.1 provides the JSON format
+IDs `ecs` (Elastic Common Schema), `gelf` (Graylog Extended Log Format), and 
`logstash` for console and file output.
+For the complete reference, see the 
https://docs.spring.io/spring-boot/4.1/reference/features/logging.html#features.logging.structured[Spring
 Boot structured logging documentation].
+
+Configure the console and file outputs independently in 
`grails-app/conf/application.yml`:
+
+[source,yaml]
+.grails-app/conf/application.yml
+----
+logging:
+    structured:
+        format:
+            console: ecs
+            file: logstash
+        json:
+            exclude: process.id

Review Comment:
   The example uses `process.id`, but Spring Boot’s structured JSON field for 
the process identifier is `process.pid`. As written, 
`logging.structured.json.exclude: process.id` won’t match anything and can 
mislead readers.



##########
grails-doc/src/en/guide/conf/config/logging.adoc:
##########
@@ -30,3 +30,73 @@ NOTE: The filename `logback.xml` still works but 
`logback-spring.xml` is now rec
 
 More information can be found in the official 
https://logback.qos.ch/documentation.html[Logback documentation].
 
+=== Structured Logging
+
+Grails does not enable structured logging. Existing Logback configuration and 
plain-text output remain unchanged
+unless an application explicitly selects a Spring Boot structured format. 
Spring Boot 4.1 provides the JSON format
+IDs `ecs` (Elastic Common Schema), `gelf` (Graylog Extended Log Format), and 
`logstash` for console and file output.
+For the complete reference, see the 
https://docs.spring.io/spring-boot/4.1/reference/features/logging.html#features.logging.structured[Spring
 Boot structured logging documentation].

Review Comment:
   This link hard-codes the Spring Boot `4.1` docs path, while other links in 
this file use the versionless `/spring-boot/reference/...` form. Hard-coding 
the version will go stale when Grails updates its Spring Boot baseline.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to