Polish "Document how to use structured logging with custom log configuration"
See gh-43301
This commit is contained in:
@@ -464,6 +464,11 @@ Logback::
|
||||
<charset>${CONSOLE_LOG_CHARSET}</charset>
|
||||
</encoder>
|
||||
----
|
||||
+
|
||||
You can also refer to the default configurations included in Spring Boot:
|
||||
+
|
||||
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/structured-console-appender.xml[Logback Structured Console Appender]
|
||||
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/structured-file-appender.xml[Logback Structured File Appender]
|
||||
Log4j2::
|
||||
+
|
||||
[source,xml]
|
||||
@@ -471,13 +476,12 @@ Log4j2::
|
||||
<!-- replace your PatternLayout with StructuredLogLayout -->
|
||||
<StructuredLogLayout format="${sys:CONSOLE_LOG_STRUCTURED_FORMAT}" charset="${sys:CONSOLE_LOG_CHARSET}"/>
|
||||
----
|
||||
======
|
||||
You can refer to default configurations in `spring-boot.jar` for fine-grained control:
|
||||
|
||||
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/structured-console-appender.xml[Logback Structured Console Appender]
|
||||
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/structured-file-appender.xml[Logback Structured File Appender]
|
||||
+
|
||||
You can also refer to the default configurations included in Spring Boot:
|
||||
+
|
||||
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/log4j2/log4j2.xml[Log4j2 Console Appender]
|
||||
* {code-spring-boot}/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/log4j2/log4j2-file.xml[Log4j2 Console and File Appender]
|
||||
======
|
||||
|
||||
|
||||
[[features.logging.structured.ecs]]
|
||||
|
||||
Reference in New Issue
Block a user