You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* pr/43301:
Polish "Document how to use structured logging with custom log configuration"
Document how to use structured logging with custom log configuration
Closesgh-43301
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/logging.adoc
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -450,6 +450,38 @@ Spring Boot supports structured logging and has support for the following JSON f
450
450
451
451
To enable structured logging, set the property configprop:logging.structured.format.console[] (for console output) or configprop:logging.structured.format.file[] (for file output) to the id of the format you want to use.
452
452
453
+
If you are using xref:#features.logging.custom-log-configuration[Custom Log Configuration], update your configuration to respect `CONSOLE_LOG_STRUCTURED_FORMAT` and `FILE_LOG_STRUCTURED_FORMAT` system properties.
454
+
Take `CONSOLE_LOG_STRUCTURED_FORMAT` for example:
455
+
[tabs]
456
+
======
457
+
Logback::
458
+
+
459
+
[source,xml]
460
+
----
461
+
<!-- replace your encoder with StructuredLogEncoder -->
0 commit comments