Skip to content

Commit 2ff6dea

Browse files
committed
Polish "Document how to use structured logging with custom log configuration"
See gh-43301
1 parent dd14158 commit 2ff6dea

File tree

1 file changed

+9
-5
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features

1 file changed

+9
-5
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/logging.adoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -464,20 +464,24 @@ Logback::
464464
<charset>${CONSOLE_LOG_CHARSET}</charset>
465465
</encoder>
466466
----
467+
+
468+
You can also refer to the default configurations included in Spring Boot:
469+
+
470+
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/structured-console-appender.xml[Logback Structured Console Appender]
471+
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/structured-file-appender.xml[Logback Structured File Appender]
467472
Log4j2::
468473
+
469474
[source,xml]
470475
----
471476
<!-- replace your PatternLayout with StructuredLogLayout -->
472477
<StructuredLogLayout format="${sys:CONSOLE_LOG_STRUCTURED_FORMAT}" charset="${sys:CONSOLE_LOG_CHARSET}"/>
473478
----
474-
======
475-
You can refer to default configurations in `spring-boot.jar` for fine-grained control:
476-
477-
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/structured-console-appender.xml[Logback Structured Console Appender]
478-
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/structured-file-appender.xml[Logback Structured File Appender]
479+
+
480+
You can also refer to the default configurations included in Spring Boot:
481+
+
479482
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/log4j2/log4j2.xml[Log4j2 Console Appender]
480483
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/log4j2/log4j2-file.xml[Log4j2 Console and File Appender]
484+
======
481485

482486

483487
[[features.logging.structured.ecs]]

0 commit comments

Comments
 (0)