You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2025/02/18 21:08:35 UTC

(logging-log4j2) branch 2.x-site-pro updated: Fix null termination advice for SOA and JTL

This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch 2.x-site-pro
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/2.x-site-pro by this push:
     new e1f6dedc59 Fix null termination advice for SOA and JTL
e1f6dedc59 is described below

commit e1f6dedc5906d210276d49632c744754a4c63770
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Tue Feb 18 22:06:41 2025 +0100

    Fix null termination advice for SOA and JTL
---
 src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.json      | 4 +---
 .../antora/modules/ROOT/examples/cloud/logstash/log4j2.properties     | 1 -
 src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.xml       | 2 +-
 src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.yaml      | 3 +--
 src/site/antora/modules/ROOT/pages/soa.adoc                           | 3 +--
 5 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.json b/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.json
index 14512de634..3ebdb0994e 100644
--- a/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.json
+++ b/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.json
@@ -6,9 +6,7 @@
         "name": "SOCKET",
         "host": "localhost",
         "port": 12345,
-        "JsonTemplateLayout": {
-          "nullEventDelimiterEnabled": true
-        }
+        "JsonTemplateLayout": {}
       }
       // end::socketAppender[]
     },
diff --git a/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.properties b/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.properties
index b3aa633b9f..c25e660b87 100644
--- a/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.properties
+++ b/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.properties
@@ -21,7 +21,6 @@ appender.0.name = SOCKET
 appender.0.host = localhost
 appender.0.port = 12345
 appender.0.layout.type = JsonTemplateLayout
-appender.0.layout.nullEventDelimiterEnabled = true
 # end::socketAppender[]
 
 rootLogger.level = WARN
diff --git a/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.xml b/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.xml
index bc7e6e3697..13b960ec2b 100644
--- a/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.xml
+++ b/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.xml
@@ -24,7 +24,7 @@
   <Appenders>
     <!-- tag::socketAppender[] -->
     <Socket name="SOCKET" host="localhost" port="12345">
-      <JsonTemplateLayout nullEventDelimiterEnabled="true"/>
+      <JsonTemplateLayout/>
     </Socket>
     <!-- end::socketAppender[] -->
   </Appenders>
diff --git a/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.yaml b/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.yaml
index 60cc47d586..d6e0a44787 100644
--- a/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.yaml
+++ b/src/site/antora/modules/ROOT/examples/cloud/logstash/log4j2.yaml
@@ -22,8 +22,7 @@ Configuration:
       name: "SOCKET"
       host: "localhost"
       port: 12345
-      JsonTemplateLayout:
-        nullEventDelimiterEnabled: true
+      JsonTemplateLayout: {}
     # end::socketAppender[]
 
   Loggers:
diff --git a/src/site/antora/modules/ROOT/pages/soa.adoc b/src/site/antora/modules/ROOT/pages/soa.adoc
index 5db72c8247..063909ae49 100644
--- a/src/site/antora/modules/ROOT/pages/soa.adoc
+++ b/src/site/antora/modules/ROOT/pages/soa.adoc
@@ -99,8 +99,7 @@ Nevertheless, there are some tips we recommend you to practice:
 
 * *For writing to console*, use a xref:manual/appenders.adoc#ConsoleAppender[Console Appender] and make sure to configure its `direct` attribute to `true` for the maximum efficiency.
 
-* *For writing to an external service*, use a xref:manual/appenders/network.adoc#SocketAppender[Socket Appender] and make sure to set the protocol to TCP and configure the null delimiter of the associated layout.
-For instance, see xref:manual/json-template-layout.adoc#plugin-attr-nullEventDelimiterEnabled[the `nullEventDelimiterEnabled` configuration attribute of JSON Template Layout].
+* *For writing to an external service*, use a xref:manual/appenders/network.adoc#SocketAppender[Socket Appender] and make sure to configure the protocol and layout's null termination (e.g., see xref:manual/json-template-layout.adoc#plugin-attr-nullEventDelimiterEnabled[the `nullEventDelimiterEnabled` configuration attribute of JSON Template Layout]) appropriately.
 
 [#file]
 === Avoid writing to files