You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by mi...@apache.org on 2017/11/29 21:16:47 UTC
svn commit: r1021515 -
/websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html
Author: mikes
Date: Wed Nov 29 21:16:47 2017
New Revision: 1021515
Log:
LOG4J2-2136 Clarify that additional fields in Gelf, Json, Xml and Yaml layouts support lookups
Modified:
websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html
Modified: websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html
==============================================================================
--- websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html (original)
+++ websites/production/logging/content/log4j/log4j-2.10.0/manual/layouts.html Wed Nov 29 21:16:47 2017
@@ -15,7 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!-- Generated by Apache Maven Doxia at 2017-11-19 -->
+<!-- Generated by Apache Maven Doxia at 2017-11-29 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -28,7 +28,7 @@
<script type="text/javascript" src="../js/site.js"></script>
<meta name="author" content="Ralph Goers" />
<meta name="author" content="Gary Gregory" />
- <meta name="Date-Revision-yyyymmdd" content="20171119" />
+ <meta name="Date-Revision-yyyymmdd" content="20171129" />
<meta http-equiv="Content-Language" content="en" />
</head>
@@ -617,10 +617,7 @@ logger.debug("one={}, two={}, three
<pre class="prettyprint linenums">
<Appenders>
<Socket name="Graylog" protocol="udp" host="graylog.domain.com" port="12201">
- <GelfLayout host="someserver" compressionType="ZLIB" compressionThreshold="1024">
- <KeyValuePair key="additionalField1" value="constant value"/>
- <KeyValuePair key="additionalField2" value="$${ctx:key}"/>
- </GelfLayout>
+ <GelfLayout host="someserver" compressionType="ZLIB" compressionThreshold="1024"/>
</Socket>
</Appenders>
</pre></div>
@@ -633,10 +630,7 @@ logger.debug("one={}, two={}, three
<pre class="prettyprint linenums">
<Appenders>
<Socket name="Graylog" protocol="tcp" host="graylog.domain.com" port="12201">
- <GelfLayout host="someserver" compressionType="OFF" includeNullDelimiter="true">
- <KeyValuePair key="additionalField1" value="constant value"/>
- <KeyValuePair key="additionalField2" value="$${ctx:key}"/>
- </GelfLayout>
+ <GelfLayout host="someserver" compressionType="OFF" includeNullDelimiter="true"/>
</Socket>
</Appenders>
</pre></div>
@@ -710,15 +704,31 @@ logger.debug("one={}, two={}, three
</tr>
</table>
-
+
<p>
- See also:
- </p>
-
+ To include any custom field in the output, use following syntax:
+ </p>
+
+<div>
+<pre class="prettyprint linenums">
+ <GelfLayout>
+ <KeyValuePair key="additionalField1" value="constant value"/>
+ <KeyValuePair key="additionalField2" value="$${ctx:key}"/>
+ </GelfLayout>
+</pre></div>
+
+<p>
+ Custom fields are included in the order they are declared. The values support <a href="lookups.html">lookups</a>.
+ </p>
+
+<p>
+ See also:
+ </p>
+
<ul>
-
+
<li>The <a class="externalLink" href="http://docs.graylog.org/en/latest/pages/gelf.html#gelf">GELF specification</a></li>
- </ul>
+ </ul>
</div>
<a name="HTMLLayout"></a>
@@ -1011,7 +1021,8 @@ logger.debug("one={}, two={}, three
<p>
To include any custom field in the output, use following syntax:
- </p>
+ </p>
+
<div>
<pre class="prettyprint linenums">
<JsonLayout>
@@ -1019,8 +1030,10 @@ logger.debug("one={}, two={}, three
<KeyValuePair key="additionalField2" value="$${ctx:key}"/>
</JsonLayout>
</pre></div>
- Custom fields are always last, in the order they are declared.
+<p>
+ Custom fields are always last, in the order they are declared. The values support <a href="lookups.html">lookups</a>.
+ </p>
<p>
Additional <a href="../runtime-dependencies.html">runtime dependencies</a> are required for using JsonLayout.
@@ -3626,7 +3639,8 @@ at org.apache.logging.log4j.core.pattern
<p>
To include any custom field in the output, use following syntax:
- </p>
+ </p>
+
<div>
<pre class="prettyprint linenums">
<XmlLayout>
@@ -3634,8 +3648,10 @@ at org.apache.logging.log4j.core.pattern
<KeyValuePair key="additionalField2" value="$${ctx:key}"/>
</XmlLayout>
</pre></div>
- Custom fields are always last, in the order they are declared.
+<p>
+ Custom fields are always last, in the order they are declared. The values support <a href="lookups.html">lookups</a>.
+ </p>
<p>
Additional <a href="../runtime-dependencies.html">runtime dependencies</a> are required for using XmlLayout.
@@ -3773,7 +3789,8 @@ source:
<p>
To include any custom field in the output, use following syntax:
- </p>
+ </p>
+
<div>
<pre class="prettyprint linenums">
<YamlLayout>
@@ -3781,8 +3798,10 @@ source:
<KeyValuePair key="additionalField2" value="$${ctx:key}"/>
</YamlLayout>
</pre></div>
- Custom fields are always last, in the order they are declared.
+<p>
+ Custom fields are always last, in the order they are declared. The values support <a href="lookups.html">lookups</a>.
+ </p>
<p>
Additional <a href="../runtime-dependencies.html">runtime dependencies</a> are required for using YamlLayout.