You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2024/08/05 10:51:02 UTC
(logging-log4j2) branch doc/2.x/appenders-network created (now 0a6bdcbd9c)
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a change to branch doc/2.x/appenders-network
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
at 0a6bdcbd9c Revamp network appender documentation
This branch includes the following new commits:
new 0a6bdcbd9c Revamp network appender documentation
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(logging-log4j2) 01/01: Revamp network appender documentation
Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch doc/2.x/appenders-network
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 0a6bdcbd9c4547a4b27165a2bb9b809226b7045c
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Thu Aug 1 15:50:36 2024 +0200
Revamp network appender documentation
We split off the documentation of the UDP, TCP, HTTP and SMTP appenders to a new page and apply the improvements from the previous PRs.
Part of #2528.
---
pom.xml | 7 +
src/site/antora/antora.tmpl.yml | 1 +
src/site/antora/antora.yml | 1 +
.../examples/manual/appenders/network/http.json | 41 +
.../manual/appenders/network/http.properties | 43 +
.../examples/manual/appenders/network/http.xml | 43 +
.../examples/manual/appenders/network/http.yaml | 44 +
.../examples/manual/appenders/network/smtp.json | 38 +
.../manual/appenders/network/smtp.properties | 45 +
.../examples/manual/appenders/network/smtp.xml | 47 +
.../examples/manual/appenders/network/smtp.yaml | 42 +
.../examples/manual/appenders/network/socket.json | 37 +
.../manual/appenders/network/socket.properties | 39 +
.../examples/manual/appenders/network/socket.xml | 46 +
.../examples/manual/appenders/network/socket.yaml | 41 +
.../examples/manual/appenders/network/ssl.json | 32 +
.../manual/appenders/network/ssl.properties | 31 +
.../ROOT/examples/manual/appenders/network/ssl.xml | 42 +
.../examples/manual/appenders/network/ssl.yaml | 37 +
.../examples/manual/appenders/network/syslog.json | 36 +
.../manual/appenders/network/syslog.properties | 39 +
.../examples/manual/appenders/network/syslog.xml | 47 +
.../examples/manual/appenders/network/syslog.yaml | 41 +
src/site/antora/modules/ROOT/nav.adoc | 1 +
.../modules/ROOT/pages/manual/appenders.adoc | 585 +-----------
.../ROOT/pages/manual/appenders/network.adoc | 980 +++++++++++++++++++++
26 files changed, 1819 insertions(+), 567 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1dc924059e..c77ea20046 100644
--- a/pom.xml
+++ b/pom.xml
@@ -337,6 +337,7 @@
<site-conversant.version>1.2.21</site-conversant.version>
<site-disruptor.version>4.0.0</site-disruptor.version>
<site-jackson.version>2.17.2</site-jackson.version>
+ <site-javax-mail.version>1.6.2</site-javax-mail.version>
<site-jctools.version>4.0.5</site-jctools.version>
<site-log4j-api.version>2.23.1</site-log4j-api.version>
<site-log4j-core.version>2.23.1</site-log4j-core.version>
@@ -768,6 +769,12 @@
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>com.sun.mail</groupId>
+ <artifactId>javax.mail</artifactId>
+ <version>${site-javax-mail.version}</version>
+ </dependency>
+
<dependency>
<groupId>org.jctools</groupId>
<artifactId>jctools-core</artifactId>
diff --git a/src/site/antora/antora.tmpl.yml b/src/site/antora/antora.tmpl.yml
index 406a721796..c7589bb6ce 100644
--- a/src/site/antora/antora.tmpl.yml
+++ b/src/site/antora/antora.tmpl.yml
@@ -57,6 +57,7 @@ asciidoc:
conversant-version: "${site-conversant.version}"
disruptor-version: "${site-disruptor.version}"
jackson-version: "${site-jackson.version}"
+ javax-mail-version: "${site-javax-mail.version}"
jctools-version: "${site-jctools.version}"
log4j-api-version: "${log4j-api.version}"
log4j-core-version: "${site-log4j-core.version}"
diff --git a/src/site/antora/antora.yml b/src/site/antora/antora.yml
index 08535b1dc7..d23c25ab4f 100644
--- a/src/site/antora/antora.yml
+++ b/src/site/antora/antora.yml
@@ -57,6 +57,7 @@ asciidoc:
conversant-version: "1.2.3-conversant"
disruptor-version: "1.2.3-disruptor"
jackson-version: "1.2.3-jackson"
+ javax-mail-version: "1.2.3-javax-mail"
jctools-version: "1.2.3-jctools"
log4j-api-version: "1.2.3-api"
log4j-core-version: "1.2.3-core"
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.json b/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.json
new file mode 100644
index 0000000000..cd7d6e83bb
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.json
@@ -0,0 +1,41 @@
+{
+ "Configuration": {
+ "Appenders": {
+ // tag::appender[]
+ "Http": {
+ "name": "HTTP",
+ "url": "https://localhost/logs",
+ "JsonTemplateLayout": {},
+ "Property": [
+ { // <1>
+ "name": "X-Java-Version",
+ "value": "${java:version}"
+ },
+ { // <2>
+ "name": "X-Context-Path",
+ "value": "$${web:contextPath}"
+ }
+ ],
+ "Ssl": {
+ "KeyStore": {
+ "location": "keystore.p12",
+ "password": "${env:KEYSTORE_PASSWORD}"
+ },
+ "TrustStore": {
+ "location": "truststore.p12",
+ "password": "${env:TRUSTSTORE_PASSWORD}"
+ }
+ }
+ }
+ // end::appender[]
+ },
+ "Loggers": {
+ "Root": {
+ "level": "INFO",
+ "AppenderRef": {
+ "ref": "HTTP"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.properties b/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.properties
new file mode 100644
index 0000000000..aca1ffc9ab
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.properties
@@ -0,0 +1,43 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##
+# tag::appender[]
+appender.0.type = Http
+appender.0.name = HTTP
+appender.0.url = https://localhost/logs
+
+# <1>
+appender.0.p0.type = Property
+appender.0.p0.name = X-Java-Version
+appender.0.p0.value = ${java:version}
+# <2>
+appender.0.p1.type = Property
+appender.0.p1.name = X-Context-Path
+appender.0.p1.value = $${web:contextPath}
+
+appender.0.layout.type = JsonTemplateLayout
+
+appender.0.ssl.type = Ssl
+appender.0.ssl.ks.type = KeyStore
+appender.0.ssl.ks.password = ${env:KEYSTORE_PASSWORD}
+
+appender.0.ssl.ts.type = TrustStore
+appender.0.ssl.ts.password = ${env:TRUSTSTORE_PASSWORD}
+# end::appender[]
+
+rootLogger.level = INFO
+rootLogger.appenderRef.0.ref = HTTP
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.xml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.xml
new file mode 100644
index 0000000000..60e5aa11f7
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<Configuration xmlns="https://logging.apache.org/xml/ns"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ https://logging.apache.org/xml/ns
+ https://logging.apache.org/xml/ns/log4j-config-2.xsd">
+ <Appenders>
+ <!-- tag::appender[] -->
+ <Http name="HTTP" url="https://localhost/logs">
+ <Property name="X-Java-Version" value="${java:version}"/> <!--1-->
+ <Property name="X-Context-Path" value="$${web:contextPath}"/> <!--2-->
+ <JsonTemplateLayout/>
+ <Ssl>
+ <KeyStore location="keystore.p12"
+ password="${env:KEYSTORE_PASSWORD}"/>
+ <TrustStore location="truststore.p12"
+ password="${env:TRUSTSTORE_PASSWORD}"/>
+ </Ssl>
+ </Http>
+ <!-- end::appender[] -->
+ </Appenders>
+ <Loggers>
+ <Root level="INFO">
+ <AppenderRef ref="HTTP"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.yaml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.yaml
new file mode 100644
index 0000000000..18e969bec8
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/http.yaml
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+Configuration:
+ Appenders:
+ # tag::appender[]
+ Http:
+ name: "HTTP"
+ host: "localhost"
+ url: "https://localhost/logs"
+ Property:
+ # <1>
+ - name: "X-Java-Version"
+ value: "${java:version}"
+ # <2>
+ - name: "X-Context-Path"
+ value: "$${web:contextPath}"
+ JsonTemplateLayout: {}
+ Ssl:
+ KeyStore:
+ location: "keystore.p12"
+ password: "${env:KEYSTORE_PASSWORD}"
+ TrustStore:
+ location: "truststore.p12"
+ password: "${env:TRUSTSTORE_PASSWORD}"
+ # end::appender[]
+ Loggers:
+ Root:
+ level: "INFO"
+ AppenderRef:
+ ref: "HTTP"
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.json b/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.json
new file mode 100644
index 0000000000..467e97def7
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.json
@@ -0,0 +1,38 @@
+{
+ "Configuration": {
+ "Appenders": {
+ // tag::appender[]
+ "SMTP": {
+ "name": "SMTP",
+ "smtpProtocol": "smtps",
+ "smtpHost": "mx.example.org",
+ "from": "app@example.org",
+ "to": "root@example.org",
+ "subject": "[%markerSimpleName] Security incident on ${hostName}", // <1>
+ "MarkerFilter": { // <2>
+ "marker": "AUDIT"
+ },
+ "HtmlLayout": {},
+ "Ssl": {
+ "KeyStore": {
+ "location": "keystore.p12",
+ "password": "${env:KEYSTORE_PASSWORD}"
+ },
+ "TrustStore": {
+ "location": "truststore.p12",
+ "password": "${env:TRUSTSTORE_PASSWORD}"
+ }
+ }
+ }
+ // end::appender[]
+ },
+ "Loggers": {
+ "Root": {
+ "level": "INFO",
+ "AppenderRef": {
+ "ref": "SMTP"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.properties b/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.properties
new file mode 100644
index 0000000000..e8d1f5bb02
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.properties
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##
+# tag::appender[]
+appender.0.type = SMTP
+appender.0.name = SMTP
+appender.0.url = https://localhost/logs
+
+appender.0.smtpProtocol = smtps
+appender.0.smtpHost = mx.example.org
+appender.0.from = app@example.org
+appender.0.to = root@example.org
+# <1>
+appender.0.subject = [%markerSimpleName] Security incident on ${hostName}
+
+# <2>
+appender.0.filter.0.type = MarkerFilter
+appender.0.filter.0.marker = AUDIT
+
+appender.0.layout.type = HtmlLayout
+
+appender.0.ssl.type = Ssl
+appender.0.ssl.ks.type = KeyStore
+appender.0.ssl.ks.password = ${env:KEYSTORE_PASSWORD}
+
+appender.0.ssl.ts.type = TrustStore
+appender.0.ssl.ts.password = ${env:TRUSTSTORE_PASSWORD}
+# end::appender[]
+
+rootLogger.level = INFO
+rootLogger.appenderRef.0.ref = SMTP
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.xml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.xml
new file mode 100644
index 0000000000..c756510b88
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<Configuration xmlns="https://logging.apache.org/xml/ns"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ https://logging.apache.org/xml/ns
+ https://logging.apache.org/xml/ns/log4j-config-2.xsd">
+ <Appenders>
+ <!-- tag::appender[] -->
+ <SMTP name="SMTP"
+ smtpProtocol="smtps"
+ smtpHost="mx.example.org"
+ from="app@example.org"
+ to="root@example.org"
+ subject="[%markerSimpleName] Security incident on ${hostName}"> <!--1-->
+ <MarkerFilter marker="AUDIT"/> <!--2-->
+ <HtmlLayout/>
+ <Ssl>
+ <KeyStore location="keystore.p12"
+ password="${env:KEYSTORE_PASSWORD}"/>
+ <TrustStore location="truststore.p12"
+ password="${env:TRUSTSTORE_PASSWORD}"/>
+ </Ssl>
+ </SMTP>
+ <!-- end::appender[] -->
+ </Appenders>
+ <Loggers>
+ <Root level="INFO">
+ <AppenderRef ref="SMTP"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.yaml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.yaml
new file mode 100644
index 0000000000..274d406434
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/smtp.yaml
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+Configuration:
+ Appenders:
+ # tag::appender[]
+ SMTP:
+ name: "SMTP"
+ smtpProtocol: "smtps"
+ smtpHost: "mx.example.org"
+ from: "app@example.org"
+ to: "root@example.org"
+ subject: "[%markerSimpleName] Security incident on ${hostName}" # <1>
+ MarkerFilter: # <2>
+ marker: "AUDIT"
+ HtmlLayout: {}
+ Ssl:
+ KeyStore:
+ location: "keystore.p12"
+ password: "${env:KEYSTORE_PASSWORD}"
+ TrustStore:
+ location: "truststore.p12"
+ password: "${env:TRUSTSTORE_PASSWORD}"
+ # end::appender[]
+ Loggers:
+ Root:
+ level: "INFO"
+ AppenderRef:
+ ref: "SMTP"
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.json b/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.json
new file mode 100644
index 0000000000..2e8461f6e2
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.json
@@ -0,0 +1,37 @@
+{
+ "Configuration": {
+ "Appenders": {
+ // tag::appender[]
+ "Socket": {
+ "name": "SYSLOG",
+ "host": "syslog.local",
+ "port": 6514,
+ "Rfc5424Layout": {
+ "appName": "myApp",
+ "facility": "DAEMON",
+ "id": "Log4j",
+ "newLineEscape": "\\n"
+ },
+ "Ssl": {
+ "KeyStore": {
+ "location": "keystore.p12",
+ "password": "${env:KEYSTORE_PASSWORD}"
+ },
+ "TrustStore": {
+ "location": "truststore.p12",
+ "password": "${env:TRUSTSTORE_PASSWORD}"
+ }
+ }
+ }
+ // end::appender[]
+ },
+ "Loggers": {
+ "Root": {
+ "level": "INFO",
+ "AppenderRef": {
+ "ref": "SYSLOG"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.properties b/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.properties
new file mode 100644
index 0000000000..4889b9d05f
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.properties
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##
+# tag::appender[]
+appender.0.type = Socket
+appender.0.name = SYSLOG
+appender.0.host = syslog.local
+appender.0.port = 6514
+
+appender.0.layout.type = Rfc5424Layout
+appender.0.layout.appName = myApp
+appender.0.layout.facility = DAEMON
+appender.0.layout.id = Log4j
+appender.0.layout.newLineEscape = \\n
+
+appender.0.ssl.type = Ssl
+appender.0.ssl.ks.type = KeyStore
+appender.0.ssl.ks.password = ${env:KEYSTORE_PASSWORD}
+
+appender.0.ssl.ts.type = TrustStore
+appender.0.ssl.ts.password = ${env:TRUSTSTORE_PASSWORD}
+# end::appender[]
+
+rootLogger.level = INFO
+rootLogger.appenderRef.0.ref = SYSLOG
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.xml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.xml
new file mode 100644
index 0000000000..c094e7b8f2
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<Configuration xmlns="https://logging.apache.org/xml/ns"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ https://logging.apache.org/xml/ns
+ https://logging.apache.org/xml/ns/log4j-config-2.xsd">
+ <Appenders>
+ <!-- tag::appender[] -->
+ <Socket name="SYSLOG"
+ host="syslog.local"
+ port="6514">
+ <Rfc5424Layout appName="myApp"
+ facility="DAEMON"
+ id="Log4j"
+ newLineEscape="\n"/>
+ <Ssl>
+ <KeyStore location="keystore.p12"
+ password="${env:KEYSTORE_PASSWORD}"/>
+ <TrustStore location="truststore.p12"
+ password="${env:TRUSTSTORE_PASSWORD}"/>
+ </Ssl>
+ </Socket>
+ <!-- end::appender[] -->
+ </Appenders>
+ <Loggers>
+ <Root level="INFO">
+ <AppenderRef ref="SYSLOG"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.yaml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.yaml
new file mode 100644
index 0000000000..270f73146d
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/socket.yaml
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+Configuration:
+ Appenders:
+ # tag::appender[]
+ Socket:
+ name: "SYSLOG"
+ host: "syslog.local"
+ port: 6514
+ Rfc5424Layout:
+ appName: "myApp"
+ facility: "DAEMON"
+ id: "Log4j"
+ newLineEscape: "\\n"
+ Ssl:
+ KeyStore:
+ location: "keystore.p12"
+ password: "${env:KEYSTORE_PASSWORD}"
+ TrustStore:
+ location: "truststore.p12"
+ password: "${env:TRUSTSTORE_PASSWORD}"
+ # end::appender[]
+ Loggers:
+ Root:
+ level: "INFO"
+ AppenderRef:
+ ref: "SYSLOG"
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.json b/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.json
new file mode 100644
index 0000000000..15826ebd2e
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.json
@@ -0,0 +1,32 @@
+{
+ "Configuration": {
+ "Appenders": {
+ "Socket": {
+ "name": "SOCKET",
+ "host": "localhost",
+ // tag::ssl[]
+ "Ssl": {
+ "KeyStore": {
+ "location": "keystore.p12",
+ "type": "PKCS12",
+ "password": "${env:KEYSTORE_PASSWORD}"
+ },
+ "TrustStore": {
+ "location": "truststore.p12",
+ "type": "PKCS12",
+ "passwordEnvironmentVariable": "TRUSTSTORE_PASSWORD"
+ }
+ }
+ // end::ssl[]
+ }
+ },
+ "Loggers": {
+ "Root": {
+ "level": "INFO",
+ "AppenderRef": {
+ "ref": "SOCKET"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.properties b/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.properties
new file mode 100644
index 0000000000..b8292de54f
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.properties
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+appender.0.type = Socket
+appender.0.name = SOCKET
+appender.0.host = localhost
+
+# tag::ssl[]
+appender.0.ssl.type = Ssl
+appender.0.ssl.ks.type = KeyStore
+appender.0.ssl.ks.password = ${env:KEYSTORE_PASSWORD}
+
+appender.0.ssl.ts.type = TrustStore
+appender.0.ssl.ts.passwordEnvironmentVariable = TRUSTSTORE_PASSWORD
+# end::ssl[]
+
+rootLogger.level = INFO
+rootLogger.appaenderRef.0.ref = SOCKET
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.xml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.xml
new file mode 100644
index 0000000000..e064bad828
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<Configuration xmlns="https://logging.apache.org/xml/ns"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ https://logging.apache.org/xml/ns
+ https://logging.apache.org/xml/ns/log4j-config-2.xsd">
+ <Appenders>
+ <Socket name="SOCKET" host="localhost">
+ <!-- tag::ssl[] -->
+ <Ssl>
+ <KeyStore location="keystore.p12"
+ type="PKCS12"
+ password="${env:KEYSTORE_PASSWORD}"/>
+ <TrustStore location="truststore.p12"
+ type="PKCS12"
+ passwordEnvironmentVariable="TRUSTSTORE_PASSWORD"/>
+ </Ssl>
+ <!-- end::ssl[] -->
+ </Socket>
+ </Appenders>
+ <Loggers>
+ <Root level="INFO">
+ <AppenderRef ref="SOCKET"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.yaml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.yaml
new file mode 100644
index 0000000000..e5184dd837
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/ssl.yaml
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+Configuration:
+ Appenders:
+ Socket:
+ name: "SOCKET"
+ host: "localhost"
+ # tag::ssl[]
+ Ssl:
+ KeyStore:
+ location: "keystore.p12"
+ type: "PKCS12"
+ password: "${env:KEYSTORE_PASSWORD}"
+ TrustStore:
+ location: "truststore.p12"
+ type: "PKCS12"
+ passwordEnvironmentVariable: "TRUSTSTORE_PASSWORD"
+ # end::ssl[]
+ Loggers:
+ Root:
+ level: "INFO"
+ AppenderRef:
+ ref: "SOCKET"
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.json b/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.json
new file mode 100644
index 0000000000..c929043511
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.json
@@ -0,0 +1,36 @@
+{
+ "Configuration": {
+ "Appenders": {
+ // tag::appender[]
+ "Syslog": {
+ "name": "SYSLOG",
+ "host": "syslog.local",
+ "port": 6514,
+ "format": "RFC5424", // <1>
+ "appName": "myApp",
+ "facility": "DAEMON",
+ "id": "Log4j",
+ "newLineEscape": "\\n",
+ "Ssl": {
+ "KeyStore": {
+ "location": "keystore.p12",
+ "password": "${env:KEYSTORE_PASSWORD}"
+ },
+ "TrustStore": {
+ "location": "truststore.p12",
+ "password": "${env:TRUSTSTORE_PASSWORD}"
+ }
+ }
+ }
+ // end::appender[]
+ },
+ "Loggers": {
+ "Root": {
+ "level": "INFO",
+ "AppenderRef": {
+ "ref": "SYSLOG"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.properties b/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.properties
new file mode 100644
index 0000000000..7bd702e361
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.properties
@@ -0,0 +1,39 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##
+# tag::appender[]
+appender.0.type = Syslog
+appender.0.name = SYSLOG
+appender.0.host = syslog.local
+appender.0.port = 6514
+# <1>
+appender.0.format = RFC5424
+appender.0.appName = myApp
+appender.0.facility = DAEMON
+appender.0.id = Log4j
+appender.0.newLineEscape = \\n
+
+appender.0.ssl.type = Ssl
+appender.0.ssl.ks.type = KeyStore
+appender.0.ssl.ks.password = ${env:KEYSTORE_PASSWORD}
+
+appender.0.ssl.ts.type = TrustStore
+appender.0.ssl.ts.password = ${env:TRUSTSTORE_PASSWORD}
+# end::appender[]
+
+rootLogger.level = INFO
+rootLogger.appenderRef.0.ref = SYSLOG
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.xml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.xml
new file mode 100644
index 0000000000..9bfff61dd8
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to you under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<Configuration xmlns="https://logging.apache.org/xml/ns"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ https://logging.apache.org/xml/ns
+ https://logging.apache.org/xml/ns/log4j-config-2.xsd">
+ <Appenders>
+ <!-- tag::appender[] -->
+ <Syslog name="SYSLOG"
+ host="syslog.local"
+ port="6514"
+ format="RFC5424"
+ appName="myApp"
+ facility="DAEMON"
+ id="Log4j"
+ newLineEscape="\n"> <!--1-->
+ <Ssl>
+ <KeyStore location="keystore.p12"
+ password="${env:KEYSTORE_PASSWORD}"/>
+ <TrustStore location="truststore.p12"
+ password="${env:TRUSTSTORE_PASSWORD}"/>
+ </Ssl>
+ </Syslog>
+ <!-- end::appender[] -->
+ </Appenders>
+ <Loggers>
+ <Root level="INFO">
+ <AppenderRef ref="SYSLOG"/>
+ </Root>
+ </Loggers>
+</Configuration>
diff --git a/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.yaml b/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.yaml
new file mode 100644
index 0000000000..e8949d110f
--- /dev/null
+++ b/src/site/antora/modules/ROOT/examples/manual/appenders/network/syslog.yaml
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+Configuration:
+ Appenders:
+ # tag::appender[]
+ Socket:
+ name: "SYSLOG"
+ host: "syslog.local"
+ port: 6514
+ format: "RFC5424" # <1>
+ appName: "myApp"
+ facility: "DAEMON"
+ id: "Log4j"
+ newLineEscape: "\\n"
+ Ssl:
+ KeyStore:
+ location: "keystore.p12"
+ password: "${env:KEYSTORE_PASSWORD}"
+ TrustStore:
+ location: "truststore.p12"
+ password: "${env:TRUSTSTORE_PASSWORD}"
+ # end::appender[]
+ Loggers:
+ Root:
+ level: "INFO"
+ AppenderRef:
+ ref: "SYSLOG"
diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc
index c379039437..a1f60e7f41 100644
--- a/src/site/antora/modules/ROOT/nav.adoc
+++ b/src/site/antora/modules/ROOT/nav.adoc
@@ -46,6 +46,7 @@
*** xref:manual/appenders/file.adoc[]
*** xref:manual/appenders/rolling-file.adoc[]
*** xref:manual/appenders/database.adoc[]
+*** xref:manual/appenders/network.adoc[]
*** xref:manual/appenders/delegating.adoc[]
** xref:manual/layouts.adoc[]
*** xref:manual/json-template-layout.adoc[]
diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
index 18964fde99..1d1e84e644 100644
--- a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
@@ -244,6 +244,24 @@ Store log events to a document-oriented database
See xref:manual/appenders/database.adoc[] for details.
+[#network-appenders]
+=== Network appenders
+
+These appenders use simple network protocols to transmit log events to a remote host.
+The supported network protocols are:
+
+`UDP`::
+`TCP`::
+These are handled by the xref:manual/appenders/network.adoc#SocketAppender[Socket Appender].
+
+`HTTP`::
+This is handled by the xref:manual/appenders/network.adoc#HttpAppender[HTTP Appender].
+
+`SMTP`::
+This is handled by the xref:manual/appenders/network.adoc#HttpAppender[SMTP Appender].
+
+See xref:manual/appenders/network.adoc[] for details.
+
[#delegating-appenders]
=== Delegating appenders
@@ -695,86 +713,6 @@ To map your Log4j `MapMessage` to JMS `javax.jms.MapMessage`, set the layout of
</Configuration>
----
-[#HttpAppender]
-=== HttpAppender
-
-The HttpAppender sends log events over HTTP.
-A Layout must be provided to format the LogEvent.
-
-It will set the `Content-Type` header according to the layout.
-Additional headers can be specified with embedded Property elements.
-
-It will also wait for a response from the server, and throw an error if no 2xx response is received.
-
-Implemented with
-https://docs.oracle.com/javase/{java-target-version}/docs/api/java/net/HttpURLConnection.html[`HttpURLConnection`].
-
-.HttpAppender Parameters
-[cols="20%,20%,60%",options="header",]
-|=======================================================================
-|Parameter Name |Type |Description
-|name |String |The name of the Appender.
-
-|filter |Filter |A Filter to determine if the event should be handled by
-this Appender. More than one Filter may be used by using a
-CompositeFilter.
-
-|layout |Layout |The Layout to use to format the LogEvent.
-
-|Ssl |SslConfiguration |Contains the configuration for the KeyStore and
-TrustStore for https. Optional, uses Java runtime defaults if not
-specified. See <<SSL>>.
-
-|verifyHostname |boolean |Whether to verify server hostname against
-certificate. Only valid for https. Optional, defaults to true
-
-|url |string |The URL to use. The URL scheme must be "http" or "https".
-
-|method |string |The HTTP method to use. Optional, default is "POST".
-
-|connectTimeoutMillis |integer |The connect timeout in milliseconds.
-Optional, default is 0 (infinite timeout).
-
-|readTimeoutMillis |integer |The socket read timeout in milliseconds.
-Optional, default is 0 (infinite timeout).
-
-| [[HttpAppender-element-headers]]headers
-| Property[]
-| Additional HTTP headers to use.
-
-The values support
-xref:manual/configuration.adoc#lazy-property-substitution[runtime property substitution]
-and are evaluated in a
-xref:manual/lookups.adoc#global-context[_global context_].
-
-|ignoreExceptions |boolean |The default is `true`, causing exceptions
-encountered while appending events to be internally logged and then
-ignored. When set to `false` exceptions will be propagated to the
-caller, instead. You must set this to `false` when wrapping this
-Appender in a <<FailoverAppender>>.
-|=======================================================================
-
-Here is a sample HttpAppender configuration snippet:
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration>
- <!-- ... -->
- <Appenders>
- <Http name="Http" url="https://localhost:9200/test/log4j/">
- <Property name="X-Java-Runtime" value="$${java:runtime}" />
- <JsonTemplateLayout/>
- <SSL>
- <KeyStore location="log4j2-keystore.jks" passwordEnvironmentVariable="KEYSTORE_PASSWORD"/>
- <TrustStore location="truststore.jks" passwordFile="${sys:user.home}/truststore.pwd"/>
- </SSL>
- </Http>
- </Appenders>
- <!-- ... -->
-</Configuration>
-----
-
[[KafkaAppender]]
=== KafkaAppender
@@ -921,493 +859,6 @@ The `ServletContext.log(String, Throwable)` method predates modern logging APIs.
By using Servlet appender you typically will not be able to differentiate log events by log level or logger name.
====
-[[SMTPAppender]]
-=== SMTPAppender
-
-Sends an e-mail when a specific logging event occurs, typically on errors or fatal errors.
-
-The number of logging events delivered in this e-mail depends on the value of the `BufferSize` option.
-The `SMTPAppender` keeps only the last `BufferSize` logging events in its cyclic buffer.
-This keeps memory requirements at a reasonable level while still delivering useful application context.
-All events in the buffer are included in the email.
-The buffer will contain the most recent events of level TRACE to WARN preceding the event that triggered the email.
-
-The default behavior is to trigger sending an email whenever an ERROR or higher severity event is logged and to format it as HTML.
-The circumstances of when the email is sent can be controlled by setting one or more filters on the Appender.
-As with other Appenders, the formatting can be controlled by specifying a Layout for the Appender.
-
-[width="100%",options="header"]
-|===
-|Parameter Name |Type |Description
-
-|name
-|String
-|The name of the Appender.
-
-|from
-|String
-|The email address of the sender.
-
-|replyTo
-|String
-|The comma-separated list of reply-to email addresses.
-
-|to
-|String
-|The comma-separated list of recipient email addresses.
-
-|cc
-|String
-|The comma-separated list of CC email addresses.
-
-|bcc
-|String
-|The comma-separated list of BCC email addresses.
-
-|subject
-|String
-|The subject of the email message.
-
-|bufferSize
-|integer
-|The maximum number of log events to be buffered for inclusion in the message. Defaults to 512.
-
-|layout
-|Layout
-|The Layout to use to format the LogEvent. If no layout is supplied xref:manual/layouts.adoc#HTMLLayout[HTML layout] will be used.
-
-|filter
-|Filter
-|A Filter to determine if the event should be handled by this Appender. More than one Filter may be used by using a CompositeFilter.
-
-|smtpDebug
-|boolean
-|When set to true turns on the session debugging on STDOUT. Defaults to false.
-
-|smtpHost
-|String
-|The SMTP hostname to send to. This parameter is required.
-
-|smtpPassword
-|String
-|The password required to authenticate against the SMTP server.
-
-|smtpPort
-|integer
-|The SMTP port to send to.
-
-|smtpProtocol
-|String
-|The SMTP transport protocol (such as "smtps", defaults to "smtp").
-
-|smtpUsername
-|String
-|The username required to authenticate against the SMTP server.
-
-|ignoreExceptions
-|boolean
-|The default is `true`, causing exceptions encountered while appending events to be internally logged and then ignored. When set to `false` exceptions will be propagated to the caller, instead. You must set this to `false` when wrapping this Appender in a <<FailoverAppender>>.
-
-|SSL
-|SslConfiguration
-|Contains the configuration for the KeyStore and TrustStore. See <<SSL>>.
-|===
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp">
- <Appenders>
- <SMTP name="Mail" subject="Error Log" to="errors@logging.apache.org" from="test@logging.apache.org"
- smtpHost="localhost" smtpPort="25" bufferSize="50">
- </SMTP>
- </Appenders>
- <Loggers>
- <Root level="error">
- <AppenderRef ref="Mail"/>
- </Root>
- </Loggers>
-</Configuration>
-----
-
-[#SocketAppender]
-=== SocketAppender
-
-The `SocketAppender` is an OutputStreamAppender that writes its output to a remote destination specified by a host and port.
-The data can be sent over either TCP or UDP and can be sent in any format.
-You can optionally secure communication with <<SSL>>.
-Note that the TCP and SSL variants write to the socket as a stream and do not expect a response from the target destination.
-Due to limitations in the TCP protocol that means that when the target server closes its connection some log events may continue to appear to succeed until a closed connection exception is raised, causing those events to be lost.
-If guaranteed delivery is required a protocol that requires acknowledgments must be used.
-
-.`SocketAppender` Parameters
-[cols="20%,20%,60%",options="header",]
-|=======================================================================
-|Parameter Name |Type |Description
-|name |String |The name of the Appender.
-
-|host |String |The name or address of the system that is listening for
-log events. This parameter is required.
-
-|port |integer |The port on the host that is listening for log events.
-This parameter must be specified. If the hostname resolves to multiple
-IP addresses the TCP and SSL variations will fail over to the next IP
-address when a connection is lost.
-
-|protocol |String |"TCP" (default), "SSL" or "UDP".
-
-|SSL |SslConfiguration |Contains the configuration for the KeyStore and
-TrustStore. See <<SSL>>.
-
-|filter |Filter |A Filter to determine if the event should be handled by
-this Appender. More than one Filter may be used by using a
-CompositeFilter.
-
-|immediateFail |boolean |When set to true, log events will not wait to
-try to reconnect and will fail immediately if the socket is not
-available.
-
-|immediateFlush |boolean |When set to true - the default, each write
-will be followed by a flush. This will guarantee the data is written to
-disk but could impact performance.
-
-|bufferedIO |boolean |When true - the default, events are written to a
-buffer and the data will be written to the socket when the buffer is
-full or, if immediateFlush is set when the record is written.
-
-|bufferSize |int |When bufferedIO is true, this is the buffer size, the
-default is 8192 bytes.
-
-|layout |Layout |The Layout to use to format the LogEvent. Required,
-there is no default. _New since 2.9, in previous versions
-SerializedLayout was the default._
-
-|reconnectionDelayMillis |integer |If set to a value greater than 0,
-after an error, the SocketManager will attempt to reconnect to the server
-after waiting for the specified number of milliseconds. If the reconnect
-fails then an exception will be thrown (which can be caught by the
-application if `ignoreExceptions` is set to `false`).
-
-|connectTimeoutMillis |integer |The connect timeout in milliseconds. The
-default is 0 (infinite timeout, like `Socket.connect()` methods).
-
-|ignoreExceptions |boolean |The default is `true`, causing exceptions
-encountered while appending events to be internally logged and then
-ignored. When set to `false` exceptions will be propagated to the
-caller, instead. You must set this to `false` when wrapping this
-Appender in a <<FailoverAppender>>.
-|=======================================================================
-
-This is an unsecured TCP configuration:
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp">
- <Appenders>
- <Socket name="socket" host="localhost" port="9500">
- <JsonTemplateLayout/>
- </Socket>
- </Appenders>
- <Loggers>
- <Root level="error">
- <AppenderRef ref="socket"/>
- </Root>
- </Loggers>
-</Configuration>
-----
-
-This is a secured <<SSL>> configuration:
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp">
- <Appenders>
- <Socket name="socket" host="localhost" port="9500">
- <JsonTemplateLayout/>
- <SSL>
- <KeyStore location="log4j2-keystore.jks" passwordEnvironmentVariable="KEYSTORE_PASSWORD"/>
- <TrustStore location="truststore.jks" passwordFile="${sys:user.home}/truststore.pwd"/>
- </SSL>
- </Socket>
- </Appenders>
- <Loggers>
- <Root level="error">
- <AppenderRef ref="socket"/>
- </Root>
- </Loggers>
-</Configuration>
-----
-
-[#SSL]
-==== SSL
-
-Several appenders can be configured to use either a plain network connection or a Secure Socket Layer (SSL) connection.
-This section documents the parameters available for SSL configuration.
-
-.SSL Configuration Parameters
-[cols="20%,20%,60%",options="header",]
-|=======================================================================
-|Parameter Name |Type |Description
-|protocol |String |The SSL protocol to use, `TLS` if omitted. A single value
-may enable multiple protocols, see the
-https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#sslcontext-algorithms[JVM
-documentation] for details.
-
-|KeyStore |KeyStore |Contains your private keys and certificates, and
-determines which authentication credentials to send to the remote host.
-
-|TrustStore |TrustStore |Contains the CA certificates of the remote
-counterparty. Determines whether the remote authentication credentials
-(and thus the connection) should be trusted.
-|=======================================================================
-
-[#KeyStore]
-==== KeyStore
-
-The Keystore is meant to contain your private keys and certificates, and determines which authentication credentials to send to the remote host.
-
-.KeyStore Configuration Parameters
-[cols="20%,20%,60%",options="header",]
-|=======================================================================
-|Parameter Name |Type |Description
-|location |String |Path to the keystore file.
-
-|password |char[] |Plain text password to access the keystore. Cannot be
-combined with either `passwordEnvironmentVariable` or `passwordFile`.
-
-|passwordEnvironmentVariable |String |Name of an environment variable
-that holds the password. Cannot be combined with either `password` or
-`passwordFile`.
-
-|passwordFile |String |Path to a file that holds the password. Cannot be
-combined with either `password` or `passwordEnvironmentVariable`.
-
-|type |String |Optional KeyStore type, e.g. `JKS`, `PKCS12`, `PKCS11`,
-`BKS`, `Windows-MY/Windows-ROOT`, `KeychainStore`, etc. The default is
-JKS. See also
-https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyStore[Standard
-types].
-
-|keyManagerFactoryAlgorithm |String |Optional KeyManagerFactory
-algorithm. The default is `SunX509`. See also
-https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyManagerFactory[Standard
-algorithms].
-|=======================================================================
-
-[#TrustStore]
-==== TrustStore
-
-The trust store is meant to contain the CA certificates you are willing to trust when a remote party presents its certificate.
-Determines whether the remote authentication credentials (and thus the connection) should be trusted.
-
-In some cases, they can be the same store, although it is often better practice to use distinct stores (especially when they are file-based).
-
-.TrustStore Configuration Parameters
-[cols="20%,20%,60%",options="header",]
-|=======================================================================
-|Parameter Name |Type |Description
-|location |String |Path to the keystore file.
-
-|password |char[] |Plain text password to access the keystore. Cannot be
-combined with either `passwordEnvironmentVariable` or `passwordFile`.
-
-|passwordEnvironmentVariable |String |Name of an environment variable
-that holds the password. Cannot be combined with either `password` or
-`passwordFile`.
-
-|passwordFile |String |Path to a file that holds the password. Cannot be
-combined with either `password` or `passwordEnvironmentVariable`.
-
-|type |String |Optional KeyStore type, e.g. `JKS`, `PKCS12`, `PKCS11`,
-`BKS`, `Windows-MY/Windows-ROOT`, `KeychainStore`, etc. The default is
-JKS. See also
-https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyStore[Standard
-types].
-
-|trustManagerFactoryAlgorithm |String |Optional TrustManagerFactory
-algorithm. The default is `SunX509`. See also
-https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#TrustManagerFactory[Standard
-algorithms].
-|=======================================================================
-
-[#Example]
-==== Example
-
-[source,xml]
-----
-<SSL>
- <KeyStore location="log4j2-keystore.jks" passwordEnvironmentVariable="KEYSTORE_PASSWORD"/>
- <TrustStore location="truststore.jks" passwordFile="${sys:user.home}/truststore.pwd"/>
-</SSL>
-----
-
-[#SyslogAppender]
-=== SyslogAppender
-
-The `SyslogAppender` is a `SocketAppender` that writes its output to a remote destination specified by a host and port in a format that conforms with either the BSD Syslog format or the RFC 5424 format.
-The data can be sent over either TCP or UDP.
-
-.`SyslogAppender` Parameters
-[cols="20%,20%,60%",options="header",]
-|=======================================================================
-|Parameter Name |Type |Description
-|advertise |boolean |Indicates whether the appender should be
-advertised.
-
-|appName |String |The value to use as the APP-NAME in the RFC 5424
-syslog record.
-
-|charset |String |The character set to use when converting the Syslog
-String to a byte array. The String must be a valid
-https://docs.oracle.com/javase/{java-target-version}/docs/api/java/nio/charset/Charset.html[`Charset`].
-If not specified, the default system Charset will be used.
-
-|connectTimeoutMillis |integer |The connect timeout in milliseconds. The
-default is 0 (infinite timeout, like `Socket.connect()` methods).
-
-|enterpriseNumber |integer |The IANA enterprise number as described in
-https://datatracker.ietf.org/doc/html/rfc5424#section-7.2.2[RFC 5424]
-
-|filter |Filter |A Filter to determine if the event should be handled by
-this Appender. More than one Filter may be used by using a
-CompositeFilter.
-
-|facility |String |The facility is used to try to classify the message.
-The facility option must be set to one of "KERN", "USER", "MAIL",
-"DAEMON", "AUTH", "SYSLOG", "LPR", "NEWS", "UUCP", "CRON", "AUTHPRIV",
-"FTP", "NTP", "AUDIT", "ALERT", "CLOCK", "LOCAL0", "LOCAL1", "LOCAL2",
-"LOCAL3", "LOCAL4", "LOCAL5", "LOCAL6", or "LOCAL7". These values may be
-specified as upper or lowercase characters.
-
-|format |String |If set to "RFC5424" the data will be formatted by RFC 5424.
-Otherwise, it will be formatted as a BSD
-Syslog record. Note that although BSD Syslog records are required to be
-1024 bytes or shorter the SyslogLayout does not truncate them. The
-RFC5424Layout also does not truncate records since the receiver must
-accept records of up to 2048 bytes and may accept longer records.
-
-|host |String |The name or address of the system that is listening for
-log events. This parameter is required.
-
-|id |String |The default structured data-id to use when formatting
-according to RFC 5424. If the LogEvent contains a StructuredDataMessage
-the id from the Message will be used instead of this value.
-
-|ignoreExceptions |boolean |The default is `true`, causing exceptions
-encountered while appending events to be internally logged and then
-ignored. When set to `false` exceptions will be propagated to the
-caller, instead. You must set this to `false` when wrapping this
-Appender in a <<FailoverAppender>>.
-
-|immediateFail |boolean |When set to true, log events will not wait to
-try to reconnect and will fail immediately if the socket is not
-available.
-
-|immediateFlush |boolean |When set to true - the default, each write
-will be followed by a flush. This will guarantee the data is written to
-disk but could impact performance.
-
-|includeMDC |boolean |Indicates whether data from the ThreadContextMap
-will be included in the RFC 5424 Syslog record. Defaults to true.
-
-|Layout |Layout |A custom layout that overrides the `format` setting.
-
-|loggerFields |List of KeyValuePairs |Allows arbitrary PatternLayout
-patterns to be included as specified ThreadContext fields; no default
-specified. To use, include a `LoggerFields` nested element, containing
-one or more `KeyValuePair` elements. Each `KeyValuePair` must have a key
-attribute, which specifies the key name that will be used to identify
-the field within the MDC Structured Data element, and a value attribute,
-which specifies the PatternLayout pattern to use as the value.
-
-|mdcExcludes |String |A comma-separated list of mdc keys that should be
-excluded from the LogEvent. This is mutually exclusive with the
-mdcIncludes attribute. This attribute only applies to RFC 5424 syslog
-records.
-
-|mdcIncludes |String |A comma-separated list of mdc keys that should be
-included in the FlumeEvent. Any keys in the MDC not found in the list
-will be excluded. This option is mutually exclusive with the mdcExcludes
-attribute. This attribute only applies to RFC 5424 syslog records.
-
-|mdcRequired |String |A comma-separated list of `mdc` keys that must be
-present in the MDC. If a key is not present a LoggingException will be
-thrown. This attribute only applies to RFC 5424 syslog records.
-
-|mdcPrefix |String |A string that should be prepended to each MDC key
-to distinguish it from event attributes. The default string is
-`mdc:`. This attribute only applies to RFC 5424 syslog records.
-
-|messageId |String |The default value to be used in the MSGID field of
-RFC 5424 syslog records.
-
-|name |String |The name of the Appender.
-
-|newLine |boolean |If true, a newline will be appended to the end of the
-syslog record. The default is false.
-
-|port |integer |The port on the host that is listening for log events.
-This parameter must be specified.
-
-|protocol |String |"TCP" or "UDP". This parameter is required.
-
-|SSL |SslConfiguration |Contains the configuration for the KeyStore and
-TrustStore. See <<SSL>>.
-
-|reconnectionDelayMillis |integer |If set to a value greater than 0,
-after an error, the SocketManager will attempt to reconnect to the server
-after waiting for the specified number of milliseconds. If the reconnect
-fails then an exception will be thrown (which can be caught by the
-application if `ignoreExceptions` is set to `false`).
-|=======================================================================
-
-A sample syslogAppender configuration that is configured with two `SyslogAppender`s, one using the BSD format and one using RFC 5424.
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp">
- <Appenders>
- <Syslog name="bsd" host="localhost" port="514" protocol="TCP"/>
- <Syslog name="RFC5424" format="RFC5424" host="localhost" port="8514"
- protocol="TCP" appName="MyApp" includeMDC="true"
- facility="LOCAL0" enterpriseNumber="18060" newLine="true"
- messageId="Audit" id="App"/>
- </Appenders>
- <Loggers>
- <Logger name="com.mycorp" level="error">
- <AppenderRef ref="RFC5424"/>
- </Logger>
- <Root level="error">
- <AppenderRef ref="bsd"/>
- </Root>
- </Loggers>
-</Configuration>
-----
-
-For <<SSL>> this appender writes its output to a remote destination specified by a host and port over SSL in a format that conforms with either the BSD Syslog format or the RFC 5424 format.
-
-[source,xml]
-----
-<?xml version="1.0" encoding="UTF-8"?>
-<Configuration status="warn" name="MyApp">
- <Appenders>
- <Syslog name="bsd" host="localhost" port="6514" protocol="SSL">
- <SSL>
- <KeyStore location="log4j2-keystore.jks" passwordEnvironmentVariable="KEYSTORE_PASSWORD"/>
- <TrustStore location="truststore.jks" passwordFile="${sys:user.home}/truststore.pwd"/>
- </SSL>
- </Syslog>
- </Appenders>
- <Loggers>
- <Root level="error">
- <AppenderRef ref="bsd"/>
- </Root>
- </Loggers>
-</Configuration>
-----
[[JeroMQAppender]]
=== ZeroMQ/JeroMQ Appender
diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc
new file mode 100644
index 0000000000..43719dbfe7
--- /dev/null
+++ b/src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc
@@ -0,0 +1,980 @@
+////
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+////
+
+= Network Appenders
+:open-book: 📖
+
+[#common-configuration]
+== Common concerns
+
+[#tls-configuration]
+=== TLS Configuration
+
+All network appenders support TLS (formerly known as SSL) connections.
+The TLS layer can be configured:
+
+* Either globally using configuration properties.
+See xref:manual/systemproperties.adoc#properties-transport-security[Transport Security]
+for more details.
+* Or by providing a nested <<SslConfiguration,`SSL`>> Log4j component.
+
+[#SslConfiguration]
+==== `Ssl`
+
+The `Ssl` component supports the following configuration options:
+
+[#SslConfiguration-attributes]
+.`Ssl` configuration attributes
+[cols="1m,1,1,5"]
+|===
+| Attribute | Type | Default value | Description
+
+| [[SslConfiguration-attr-protocol]]protocol
+| `String`
+| `TLS`
+a|
+It specifies the
+https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#SSLContext[`SSLContext` algorithm]
+that https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html[JSSE] will use.
+
+[NOTE]
+====
+This setting can only be used to reduce the highest version of TLS to be used.
+
+To disable older TLS versions, see
+https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#InstallationAndCustomization[JSSE documentation].
+====
+
+| [[SslConfiguration-attr-verifyHostName]]verifyHostName
+| `boolean`
+| `false`
+|
+If `true`, the host name in X509 certificate will be compared to the requested host name.
+In the case of a mismatch, the connection will fail.
+
+See also
+xref:manual/systemproperties.adoc#log4j2.sslVerifyHostName[`log4j2.sslVerifyHostName`].
+|===
+
+[#SslConfiguration-elements]
+.`Ssl` nested elements
+[cols="1m,1,4"]
+|===
+| Type | Multiplicity | Description
+
+| [[SslConfiguration-element-KeyStore]]<<KeyStoreConfiguration,`KeyStore`>>
+| zero or one
+|
+It specifies the
+https://docs.oracle.com/javase/8/docs/api/java/security/KeyStore.html[`KeyStore`]
+to use for TLS client authentication.
+
+| [[SslConfiguration-element-TrustStore]]<<TrustStoreConfiguration,`TrustStore`>>
+| zero or one
+|
+It specifies the trust roots to use for TLS server authentication.
+
+|===
+
+xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-net-ssl-SslConfiguration[{open-book} Plugin reference for `SSL`]
+
+[#KeyStoreConfiguration]
+==== KeyStore
+
+The `KeyStore` is meant to contain your private keys and certificates, and determines which authentication credentials to send to the remote host.
+
+[#KeyStoreConfiguration-attributes]
+.`KeyStore` configuration attributes
+[cols="1m,1,1,5"]
+|===
+| Attribute | Type | Default value | Description
+
+| [[KeyStoreConfiguration-attr-location]]location
+| https://docs.oracle.com/javase/{java-target-version}/docs/api/java/nio/file/Path.html[`Path`] or
+https://docs.oracle.com/javase/{java-target-version}/docs/api/java/net/URI.html[`URI`]
+|
+|
+The location of the private key store.
+
+See also xref:manual/systemproperties.adoc#log4j2.keyStoreLocation[`log4j2.keyStoreLocation`].
+
+| [[KeyStoreConfiguration-attr-password]]password
+| `String`
+| `null`
+|
+The password for the private key store.
+
+See also xref:manual/systemproperties.adoc#log4j2.keyStorePassword[`log4j2.keyStorePassword`].
+
+| [[KeyStoreConfiguration-attr-passwordEnvironmentVariable]]passwordEnvironmentVariable
+| `String`
+| `null`
+|
+The name of the environment variable that contains the password for the private key store.
+
+See also xref:manual/systemproperties.adoc#log4j2.keyStorePasswordEnvironmentVariable[`log4j2.keyStorePasswordEnvironmentVariable`].
+
+| [[KeyStoreConfiguration-attr-passwordFile]]passwordFile
+| https://docs.oracle.com/javase/{java-target-version}/docs/api/java/nio/file/Path.html[`Path`]
+| `null`
+|
+The name of a file that contains the password for the private key store.
+
+See also xref:manual/systemproperties.adoc#log4j2.keyStorePasswordFile[`log4j2.keyStorePasswordFile`].
+
+| [[KeyStoreConfiguration-attr-type]]type
+| https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyStore[`KeyStore`]
+| https://docs.oracle.com/javase/{java-target-version}/docs/api/java/security/KeyStore.html#getDefaultType--[_JVM dependent_]
+|
+The type of private key store.
+See https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyStore[`KeyStore` standard types].
+
+See also xref:manual/systemproperties.adoc#log4j2.keyStoreType[`log4j2.keyStoreType`].
+
+| [[KeyStoreConfiguration-attr-keyManagerFactoryAlgorithm]]keyManagerFactoryAlgorithm
+| https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyManagerFactory[`KeyManagerFactory`]
+|https://docs.oracle.com/javase/{java-target-version}/docs/api/javax/net/ssl/KeyManagerFactory.html#getDefaultAlgorithm--[_JVM dependent_]
+|
+Name of the https://docs.oracle.com/javase/{java-target-version}/docs/api/javax/net/ssl/KeyManagerFactory.html[`KeyManagerFactory`] implementation to use for the private key store.
+See https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyManagerFactory[`KeyManagerFactory` standard names].
+
+See also xref:manual/systemproperties.adoc#log4j2.keyStoreKeyManagerFactoryAlgorithm[`log4j2.keyStoreKeyManagerFactoryAlgorithm`].
+|===
+
+xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-net-ssl-KeyStoreConfiguration[{open-book} Plugin reference for `KeyStore`]
+
+[#TrustStoreConfiguration]
+==== TrustStore
+
+The trust store is meant to contain the CA certificates you are willing to trust when a remote party presents its certificate.
+It determines whether the remote authentication credentials (and thus the connection) should be trusted.
+
+[#TrustStoreConfiguration-attributes]
+.`TrustStore` configuration attributes
+[cols="1m,1,1,5"]
+|===
+| Attribute | Type | Default value | Description
+
+| [[TrustStoreConfiguration-attr-location]]location
+| https://docs.oracle.com/javase/{java-target-version}/docs/api/java/nio/file/Path.html[`Path`] or
+https://docs.oracle.com/javase/{java-target-version}/docs/api/java/net/URI.html[`URI`]
+|
+|
+The location of the trust store.
+
+See also xref:manual/systemproperties.adoc#log4j2.trustStoreLocation[`log4j2.trustStoreLocation`].
+
+| [[TrustStoreConfiguration-attr-password]]password
+| `String`
+| `null`
+|
+The password for the trust store.
+
+See also xref:manual/systemproperties.adoc#log4j2.trustStorePassword[`log4j2.trustStorePassword`].
+
+| [[TrustStoreConfiguration-attr-passwordEnvironmentVariable]]passwordEnvironmentVariable
+| `String`
+| `null`
+|
+The name of the environment variable that contains the password for the trust store.
+
+See also xref:manual/systemproperties.adoc#log4j2.trustStorePasswordEnvironmentVariable[`log4j2.trustStorePasswordEnvironmentVariable`].
+
+| [[TrustStoreConfiguration-attr-passwordFile]]passwordFile
+| https://docs.oracle.com/javase/{java-target-version}/docs/api/java/nio/file/Path.html[`Path`]
+| `null`
+|
+The name of a file that contains the password for the trust store.
+
+See also xref:manual/systemproperties.adoc#log4j2.trustStorePasswordFile[`log4j2.trustStorePasswordFile`].
+
+| [[TrustStoreConfiguration-attr-type]]type
+| https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyStore[`KeyStore`]
+| https://docs.oracle.com/javase/{java-target-version}/docs/api/java/security/KeyStore.html#getDefaultType--[_JVM dependent_]
+|
+The type of trust store.
+See https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyStore[`KeyStore` standard types].
+
+See also xref:manual/systemproperties.adoc#log4j2.trustStoreType[`log4j2.trustStoreType`].
+
+| [[TrustStoreConfiguration-attr-keyManagerFactoryAlgorithm]]keyManagerFactoryAlgorithm
+| https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyManagerFactory[`KeyManagerFactory`]
+|https://docs.oracle.com/javase/{java-target-version}/docs/api/javax/net/ssl/KeyManagerFactory.html#getDefaultAlgorithm--[_JVM dependent_]
+|
+Name of the https://docs.oracle.com/javase/{java-target-version}/docs/api/javax/net/ssl/KeyManagerFactory.html[`KeyManagerFactory`] implementation to use for the trust store.
+See https://docs.oracle.com/javase/{java-target-version}/docs/technotes/guides/security/StandardNames.html#KeyManagerFactory[`KeyManagerFactory` standard names].
+
+See also xref:manual/systemproperties.adoc#log4j2.trustStoreKeyManagerFactoryAlgorithm[`log4j2.trustStoreKeyManagerFactoryAlgorithm`].
+|===
+
+xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-net-ssl-TrustStoreConfiguration[{open-book} Plugin reference for `TrustStore`]
+
+[#SslConfiguration-examples]
+==== TLS configuration example
+
+This is an example of TLS configuration:
+
+[tabs]
+====
+XML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/ssl.xml[`log4j2.xml`]
+[source,xml,indent=0]
+----
+include::example$manual/appenders/network/ssl.xml[tag=ssl]
+----
+
+JSON::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/ssl.json[`log4j2.json`]
+[source,json,indent=0]
+----
+include::example$manual/appenders/network/ssl.json[tag=ssl]
+----
+
+YAML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/ssl.yaml[`log4j2.yaml`]
+[source,yaml,indent=0]
+----
+include::example$manual/appenders/network/ssl.yaml[tag=ssl]
+----
+
+Properties::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/ssl.properties[`log4j2.properties`]
+[source,properties,indent=0]
+----
+include::example$manual/appenders/network/ssl.properties[tag=ssl]
+----
+====
+
+[#HttpAppender]
+== HTTP Appender
+
+The HTTP Appender sends log events over HTTP, by wrapping them in an HTTP request.
+The `Content-Type` HTTP header is set based on the
+link:../javadoc/log4j-core/org/apache/logging/log4j/core/Layout.html#getContentType()[`getContentType()`]
+method of the
+<<HttpAppender-element-Layout,nested layout>>.
+Additional headers can be configured using the nested
+<<HttpAppender-element-Property,`Property` elements>>.
+
+If the appender receives a response with status code different from `2xx`, an exception is thrown.
+See also <<HttpAppender-attr-ignoreExceptions,`ignoreExceptions`>> configuration attribute.
+
+[NOTE]
+====
+The implementation uses
+https://docs.oracle.com/javase/{java-target-version}/docs/api/java/net/HttpURLConnection.html[`HttpURLConnection`]
+under the hood.
+====
+
+[#HttpAppender-attributes]
+.HTTP Appender configuration attributes
+[cols="1m,1,1,5"]
+|===
+| Attribute | Type | Default value | Description
+
+4+h| Required
+
+| [[HttpAppender-attr-name]]name
+| `String`
+|
+| The name of the appender.
+
+| [[HttpAppender-attr-url]]url
+| https://docs.oracle.com/javase/8/docs/api/java/net/URL.html[`URL`]
+|
+| The URL of the HTTP server.
+Only the `http` and `https` schemas are supported.
+
+4+h| Optional
+
+| [[HttpAppender-attr-connectTimeoutMillis]]connectTimeoutMillis
+| `int`
+| `0`
+|
+The connect timeout in milliseconds.
+If `0` the timeout is infinite.
+
+| [[HttpAppender-attr-readTimeoutMillis]]readTimeoutMillis
+| `int`
+| `0`
+|The socket read timeout in milliseconds.
+If `0` the timeout is infinite.
+
+| [[HttpAppender-attr-ignoreExceptions]]ignoreExceptions
+| `boolean`
+| `true`
+| If `false`, logging exception will be forwarded to the caller of the logging statement.
+Otherwise, they will be ignored.
+
+Logging exceptions are always also logged to xref:manual/status-logger.adoc[]
+
+| [[HttpAppender-attr-method]]method
+| `String`
+| `POST`
+| The HTTP method to use.
+
+| [[HttpAppender-attr-verifyHostName]]verifyHostName
+| `boolean`
+| `true`
+|
+If `true`, the host name in X509 certificate will be compared to the requested host name.
+In the case of a mismatch, the connection will fail.
+
+|===
+
+[#HttpAppender-elements]
+.HTTP Appender nested elements
+[cols="1m,1,4"]
+|===
+| Type | Multiplicity | Description
+
+| [[HttpAppender-element-Filter]]xref:manual/filters.adoc[`Filter`]
+| zero or one
+|
+Allows filtering log events just before they are formatted and sent.
+
+See also xref:manual/filters.adoc#appender-stage[appender filtering stage].
+
+| [[HttpAppender-element-Layout]]xref:manual/layouts.adoc[`Layout`]
+| **one**
+|
+Formats log events.
+The choice of the layout is also responsible for the `Content-Type` header of HTTP requests.
+
+See xref:manual/layouts.adoc[] for more information.
+
+| [[HttpAppender-element-Property]]xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-config-Property[`Property`]
+| zero or more
+| Additional HTTP headers to use.
+
+The values support
+xref:manual/configuration.adoc#lazy-property-substitution[runtime property substitution]
+and are evaluated in a
+xref:manual/lookups.adoc#global-context[_global context_].
+
+| [[HttpAppender-element-SslConfiguration]]<<SslConfiguration,`SSL`>>
+| zero or one
+|
+It specifies the TLS parameters to use.
+See <<tls-configuration>> for more details.
+
+|===
+
+xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-appender-HttpAppender[{open-book} Plugin reference for `HTTP`]
+
+[#HttpAppender-examples]
+=== Configuration examples
+
+Here is a sample Http Appender configuration snippet:
+
+[tabs]
+====
+XML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/http.xml[`log4j2.xml`]
+[source,xml,indent=0]
+----
+include::example$manual/appenders/network/http.xml[tag=appender]
+----
+
+JSON::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/http.json[`log4j2.json`]
+[source,json,indent=0]
+----
+include::example$manual/appenders/network/http.json[tag=appender]
+----
+
+YAML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/http.yaml[`log4j2.yaml`]
+[source,yaml,indent=0]
+----
+include::example$manual/appenders/network/http.yaml[tag=appender]
+----
+
+Properties::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/http.properties[`log4j2.properties`]
+[source,properties,indent=0]
+----
+include::example$manual/appenders/network/http.properties[tag=appender]
+----
+====
+
+<1> This HTTP header is evaluated once at configuration time.
+<2> This HTTP header is evaluated at each log event.
+
+[[SMTPAppender]]
+== SMTP Appender
+
+The SMTP writes log events to an e-mail service using
+https://jakarta.ee/specifications/mail/1.6/[Jakarta Mail 1.6 or higher].
+
+[IMPORTANT]
+====
+Unlike what happens with
+xref:manual/filters.adoc#appender-stage[most appenders], the SMTP does **not** discard log events that are denied by the
+<<SmtpAppender-element-Filter,`Filter`>> element.
+
+All the log events received by the appender are added to a cyclic log event buffer as context.
+If the filter accepts a message, an e-mail is sent.
+====
+
+[#SmtpAppender-attributes]
+.SMTP Appender configuration attributes
+[cols="1m,1,2,5"]
+|===
+| Attribute | Type | Default value | Description
+
+4+h| Required
+
+| [[SmtpAppender-attr-name]]name
+| `String`
+|
+| The name of the appender.
+
+4+h| Optional
+
+| [[SmtpAppender-attr-bufferSize]]bufferSize
+| `int`
+| `512`
+|
+The maximum number of log events to be buffered for inclusion in a single message.
+
+| [[SmtpAppender-attr-ignoreExceptions]]ignoreExceptions
+| `boolean`
+| `true`
+| If `false`, logging exception will be forwarded to the caller of the logging statement.
+Otherwise, they will be ignored.
+
+Logging exceptions are always also logged to xref:manual/status-logger.adoc[]
+
+| [[SmtpAppender-attr-smtpDebug]]smtpDebug
+| `boolean`
+| `false`
+|
+When set to `true` turns on the session debugging.
+In the reference implementation of Jakarta Mail
+(https://projects.eclipse.org/projects/ee4j.angus[Eclipse Angus])
+this will cause log messages to be printed on `System.out`.
+
+See the javadoc of
+https://jakarta.ee/specifications/mail/2.1/apidocs/jakarta.mail/jakarta/mail/session#setDebug(boolean)[`Session.setDebug()`]
+for more details.
+
+| [[SmtpAppender-attr-]]smtpProtocol
+| `String`
+| `smtp`
+a|
+The Jakarta Mail transport protocol.
+Most implementations provide:
+
+`smtp`::
+SMTP
+
+`smtps`::
+SMTP over TLS
+
+| [[SmtpAppender-attr-smtpHost]]smtpHost
+| `String`
+| `localhost`
+|
+The SMTP hostname to send to.
+
+| [[SmtpAppender-attr-Port]]smtpPort
+| `int`
+a|
+`25`:: for `smtp`
+`465`:: for `smtps`
+|The SMTP port to send to.
+
+| [[SmtpAppender-attr-smtpUsername]]smtpUsername
+| `String`
+|
+|
+The username used to authenticate against the SMTP server.
+
+| [[SmtpAppender-attr-smtpPassword]]smtpPassword
+| `String`
+|
+|The password used to authenticate against the SMTP server.
+
+
+4+h| https://datatracker.ietf.org/doc/html/rfc5322[RFC 822 message] fields
+
+| [[SmtpAppender-attr-from]]from
+| https://jakarta.ee/specifications/mail/2.1/apidocs/jakarta.mail/jakarta/mail/internet/internetaddress[`InternetAddress[]`]
+|
+|
+A list of
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.6.2[sender e-mail addresses].
+
+See
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.4[RFC2822 Address Specification]
+for the format.
+
+| [[SmtpAppender-attr-replyTo]]replyTo
+| https://jakarta.ee/specifications/mail/2.1/apidocs/jakarta.mail/jakarta/mail/internet/internetaddress[`InternetAddress[]`]
+|
+|
+A list of
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.6.2[reply-to e-mail addresses].
+
+See
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.4[RFC2822 Address Specification]
+for the format.
+
+| [[SmtpAppender-attr-to]]to
+| https://jakarta.ee/specifications/mail/2.1/apidocs/jakarta.mail/jakarta/mail/internet/internetaddress[`InternetAddress[]`]
+|
+|
+A list of
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.6.3[recipient e-mail addresses].
+
+See
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.4[RFC2822 Address Specification]
+for the format.
+
+**Required**, if <<SmtpAppender-attr-cc,`cc`>> and <<SmtpAppender-attr-bcc,`bcc`>> are empty.
+
+| [[SmtpAppender-attr-cc]]cc
+| https://jakarta.ee/specifications/mail/2.1/apidocs/jakarta.mail/jakarta/mail/internet/internetaddress[`InternetAddress[]`]
+|
+|
+A list of
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.6.3[CC e-mail addresses].
+
+See
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.4[RFC2822 Address Specification]
+for the format.
+
+**Required**, if <<SmtpAppender-attr-to,`to`>> and <<SmtpAppender-attr-bcc,`bcc`>> are empty.
+
+| [[SmtpAppender-attr-bcc]]bcc
+| https://jakarta.ee/specifications/mail/2.1/apidocs/jakarta.mail/jakarta/mail/internet/internetaddress[`InternetAddress[]`]
+|
+|
+A list of
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.6.3[BCC e-mail addresses].
+
+See
+https://datatracker.ietf.org/doc/html/rfc2822#section-3.4[RFC2822 Address Specification]
+for the format.
+
+**Required**, if <<SmtpAppender-attr-to,`to`>> and <<SmtpAppender-attr-cc,`cc`>> are empty.
+
+| [[SmtpAppender-attr-subject]]subject
+| `String`
+|
+|
+It specifies the subject field of the RFC 822 message.
+
+This field can contain
+xref:manual/pattern-layout.adoc#converters[pattern converters].
+|===
+
+[#SmtpAppender-elements]
+.HTTP Appender nested elements
+[cols="1m,1,4"]
+|===
+| Type | Multiplicity | Description
+
+| [[SmtpAppender-element-Filter]]xref:manual/filters.adoc[`Filter`]
+| zero or one
+a|
+A filter that decides which events trigger an e-mail and which events are buffered for context.
+
+If absent, a
+xref:manual/filters.adoc#ThresholdFilter[`ThresholdFilter`]
+with default parameters will be used.
+
+| [[SmtpAppender-element-Layout]]xref:manual/layouts.adoc[`Layout`]
+| **one**
+|
+Formats log events.
+The choice of the layout is also responsible for the `Content-Type` header of e-mail message.
+
+See xref:manual/layouts.adoc[] for more information.
+
+| [[SmtpAppender-element-SslConfiguration]]<<SslConfiguration,`SSL`>>
+| zero or one
+|
+It specifies the TLS parameters to use.
+See <<tls-configuration>> for more details.
+
+|===
+
+xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-appender-SmtpAppender[{open-book} Plugin reference for `SMTP`]
+
+Additional runtime dependencies are required to use the SMTP appender:
+
+[tabs]
+====
+Maven::
++
+[source,xml]
+----
+<!-- We assume you use `log4j-bom` for dependency management -->
+<dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jakarta-smtp</artifactId>
+ <scope>runtime</scope>
+</dependency>
+----
+
+Gradle::
++
+[source,groovy]
+----
+// We assume you use `log4j-bom` for dependency management
+runtimeOnly 'org.apache.logging.log4j:log4j-jakarta-smtp'
+----
+====
+
+.Click here if you are you using Jakarta EE 8 or any version of Java EE?
+[%collapsible]
+=====
+Jakarta EE 8 and all Java EE applications servers use the legacy `javax` package prefix instead of `jakarta`.
+If you are using those application servers, you should replace the dependencies above with:
+
+[tabs]
+====
+Maven::
++
+[source,xml,subs="+attributes"]
+----
+<dependency>
+ <groupId>com.sun.mail</groupId>
+ <artifactId>javax.mail</artifactId>
+ <version>{javax-mail-version}</version>
+</dependency>
+----
+
+Gradle::
++
+[source,groovy,subs="+attributes"]
+----
+runtimeOnly 'com.sun.mail:javax.mail:{javax-mail-version}'
+----
+====
+=====
+
+[#SmtpAppender-examples]
+=== Configuration examples
+
+Here is an example of SMTP Appender configuration:
+
+[tabs]
+====
+XML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/smtp.xml[`log4j2.xml`]
+[source,xml,indent=0]
+----
+include::example$manual/appenders/network/smtp.xml[tag=appender]
+----
+
+JSON::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/smtp.json[`log4j2.json`]
+[source,json,indent=0]
+----
+include::example$manual/appenders/network/smtp.json[tag=appender]
+----
+
+YAML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/smtp.yaml[`log4j2.yaml`]
+[source,yaml,indent=0]
+----
+include::example$manual/appenders/network/smtp.yaml[tag=appender]
+----
+
+Properties::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/smtp.properties[`log4j2.properties`]
+[source,properties,indent=0]
+----
+include::example$manual/appenders/network/smtp.properties[tag=appender]
+----
+====
+
+<1> The `subject` attribute can use xref:manual/pattern-layout.adoc#converters[pattern converters].
+<2> An e-mail will be sent for each `AUDIT` log event.
+Additional log events will be kept for context.
+
+[#SocketAppender]
+== Socket Appender
+
+The Socket Appender that writes its output to a remote destination using TCP or UDP sockets.
+You can optionally secure communication with <<tls-configuration,TLS>>.
+
+[NOTE]
+====
+The TCP and TLS variants write to the socket as a stream and do not expect a response from the target destination.
+When the target server closes its connection, some log events may continue to appear as delivered until a
+https://docs.oracle.com/javase/8/docs/api/java/net/SocketException.html[`SocketException`]
+is raised, causing those events to be lost.
+
+If guaranteed delivery is required, a protocol that requires acknowledgments must be used.
+====
+
+[#SocketAppender-attributes]
+.Socket Appender configuration attributes
+[cols="1m,1,2,5"]
+|===
+| Attribute | Type | Default value | Description
+
+4+h| Required
+
+| [[SocketAppender-attr-host]]host
+| `String`
+|
+|
+The name or address of the system that is listening for log events.
+
+| [[SocketAppender-attr-name]]name
+| `String`
+|
+| The name of the appender.
+
+4+h| Optional
+
+| [[SocketAppender-attr-bufferedIo]]bufferedIo
+| `boolean`
+| `true`
+|
+If set to `true`, Log4j Core will format each log event in an internal buffer, before sending it to the underlying resource.
+
+See xref:manual/appenders.adoc#buffering[Buffering] for more details.
+
+| [[SocketAppender-attr-bufferSize]]bufferSize
+| `int`
+| xref:manual/systemproperties.adoc#log4j2.encoderByteBufferSize[`8192`]
+a|
+The size of the
+https://docs.oracle.com/javase/{java-target-version}/docs/api/java/nio/ByteBuffer.html[`ByteBuffer`]
+internally used by the appender.
+
+See xref:manual/appenders.adoc#buffering[Buffering] for more details.
+
+| [[SocketAppender-attr-ignoreExceptions]]ignoreExceptions
+| `boolean`
+| `true`
+| If `false`, logging exception will be forwarded to the caller of the logging statement.
+Otherwise, they will be ignored.
+
+Logging exceptions are always also logged to xref:manual/status-logger.adoc[]
+
+| immediateFail
+| boolean
+| `true`
+|
+When set to `true`, log events will not wait to try to reconnect and will fail immediately if the socket is not
+available.
+
+| [[SocketAppender-attr-immediateFlush]]immediateFlush
+| `boolean`
+| `true`
+|
+If set to `true`, the appender will flush its internal buffer after each event.
+
+See xref:manual/appenders.adoc#buffering[Buffering] for more details.
+
+| [[SocketAppender-attr-port]]port
+| `int`
+a|
+`4560`:: for `TCP`
+`6514`:: for `SSL`
+_no default_:: for `UDP`
+|
+The port on the host that is listening for log events.
+
+**Required**
+
+| [[SocketAppender-attr-protocol]]protocol
+| _enumeration_
+| `TCP`
+|
+The network protocol to use: `UDP`, `TCP` or `SSL`.
+
+| [[SocketAppender-attr-connectTimeoutMillis]]connectTimeoutMillis
+| `int`
+| `0`
+|
+The connect timeout in milliseconds.
+If `0` the timeout is infinite.
+
+| [[SocketAppender-attr-readTimeoutMillis]]readTimeoutMillis
+| `int`
+| `0`
+|The socket read timeout in milliseconds.
+If `0` the timeout is infinite.
+|===
+
+[#SocketAppender-elements]
+.Socket Appender nested elements
+[cols="1m,1,4"]
+|===
+| Type | Multiplicity | Description
+
+| [[SocketAppender-element-Filter]]xref:manual/filters.adoc[`Filter`]
+| zero or one
+|
+Allows filtering log events just before they are formatted and sent.
+
+See also xref:manual/filters.adoc#appender-stage[appender filtering stage].
+
+| [[SocketAppender-element-Layout]]xref:manual/layouts.adoc[`Layout`]
+| zero or one
+|
+Formats log events.
+
+See xref:manual/layouts.adoc[] for more information.
+
+| [[SocketAppender-element-SslConfiguration]]<<SslConfiguration,`SSL`>>
+| zero or one
+|
+It specifies the TLS parameters to use.
+See <<tls-configuration>> for more details.
+
+|===
+
+[#SocketAppender-examples]
+=== Configuration examples
+
+The following example appends log events to a Syslog server using a TLS connection and the RFC5424 log event format:
+
+[tabs]
+====
+XML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/socket.xml[`log4j2.xml`]
+[source,xml,indent=0]
+----
+include::example$manual/appenders/network/socket.xml[tag=appender]
+----
+
+JSON::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/socket.json[`log4j2.json`]
+[source,json,indent=0]
+----
+include::example$manual/appenders/network/socket.json[tag=appender]
+----
+
+YAML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/socket.yaml[`log4j2.yaml`]
+[source,yaml,indent=0]
+----
+include::example$manual/appenders/network/socket.yaml[tag=appender]
+----
+
+Properties::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/socket.properties[`log4j2.properties`]
+[source,properties,indent=0]
+----
+include::example$manual/appenders/network/socket.properties[tag=appender]
+----
+====
+
+[#SyslogAppender]
+== Syslog Appender
+
+The Syslog Appender is a utility Log4j plugin to combine a <<SocketAppender>> with either a
+xref:manual/layouts.adoc#SyslogLayout[Syslog Layout]
+or
+xref:manual/layouts.adoc#RFC5424Layout[Rfc5424 Layout]
+to provide a functionality similar to the
+https://man7.org/linux/man-pages/man3/syslog.3.html[UNIX `syslog` function].
+
+It has a single configuration property to select the layout to use:
+
+[#SyslogAppender-attributes]
+.Configuration attributes specific to Syslog Appender
+[cols="1m,1,2,5"]
+|===
+| Attribute | Type | Default value | Description
+
+| [[SyslogAppender-attr-format]]format
+| _enumeration_
+| `BSD`
+a|
+It determines the layout to use:
+
+`BSD`::
+Uses the legacy xref:manual/layouts.adoc#SyslogLayout[Syslog Layout].
+
+`RFC5242`::
+Uses the xref:manual/layouts.adoc#RFC5424Layout[Rfc5424 Layout].
+
+|===
+
+All the remaining configuration attributes and nested elements are inherited from
+<<SocketAppender,Socket Appender>> and the chosen layout.
+
+xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-logging-log4j-core-appender-SyslogAppender[{open-book} Plugin reference for `Syslog`]
+
+[#SyslogAppender-examples]
+=== Configuration examples
+
+The following configuration snippet creates the same appender as the <<SocketAppender-examples,Socket Appender example above>>:
+
+[tabs]
+====
+XML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/syslog.xml[`log4j2.xml`]
+[source,xml,indent=0]
+----
+include::example$manual/appenders/network/syslog.xml[tag=appender]
+----
+
+JSON::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/syslog.json[`log4j2.json`]
+[source,json,indent=0]
+----
+include::example$manual/appenders/network/syslog.json[tag=appender]
+----
+
+YAML::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/syslog.yaml[`log4j2.yaml`]
+[source,yaml,indent=0]
+----
+include::example$manual/appenders/network/syslog.yaml[tag=appender]
+----
+
+Properties::
++
+.Snippet from an example {antora-examples-url}/manual/appenders/network/syslog.properties[`log4j2.properties`]
+[source,properties,indent=0]
+----
+include::example$manual/appenders/network/syslog.properties[tag=appender]
+----
+====
+
+<1> By setting the `format` attribute to `RFC5424`, the xref:manual/layouts.adoc#RFC5424Layout[`Rfc5424Layout`] will be used.
+The remaining attributes are either attributes of <<SocketAppender,Socket Appender>> or the `Rfc5424Layout`.